From: Ernest O. <er...@wi...> - 2009-07-23 02:33:19
|
I have a cpp file that I can generate a lua wrapper for with swig by not using a .i file but instead running swig with the source file on the command line. This works very well. However, I need a wrapper for a structure defined in a header file that the cpp file uses. How can I generate that wrapper and have it be part of the same Lua module? Also, is there a way I could do this from a .i file? I mean could I specify a .h and .cpp files for it to wrap, but also have header files in the %{ %} section? I¹m doing this this way because so far it doesn¹t seem that I need to define each thing to wrap in a .i file. This code is very clean and straightforward. And there are a LOT of things to wrap, so it would be quite painful to have to list them all in a .i file. So right now I can access all the functions and constants and so on that were in the .cpp file. But I can¹t create the structure needed that all those function take as their first parameter. Sorry if this is way simple. I tried to figure this out from the docs and a search of the archive. Thanks, Ernest |