lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello Roger,
SWIG is my area.
Depending upon the version of SWIG used, the exported name will be either
ClassA_init() or luaopen_classA()
Earlier versions of SWIG (about a year to two back) used ClassA_init(), but once lua5.1 came out with a the require command also working on shared libraries the name changed to luaopen_classA() to be compatible with lua5.1

If you look in your wrapper code you should find a line
#define SWIG_init      <something>
This <something> is the name of the exported function.

Personally I would download the latest copy of swig, and use lua5.1.x they integrate together very well and all the documentation in the manual is based upon these versions.

Hope this helps,
Mark
<ee2a733e0802130826g7cd82b66nc093c09f8f16016d@mail.gmail.com><ee2a733e0802130847i4bcc1d80mddcd738dd370bfd2@mail.gmail.com>Im testing swig for wrapper code generation and according to docs, it
should be easy: swig -lua -c++ classA.i
This generates the required code, and such code should have a function
named ClassA_Init(). What I have found is that such function is not
created. Can somebody tell me if Im missing some step?

ee2a733e0802130847i4bcc1d80mddcd738dd370bfd2@mail.gmail.com>
ee2a733e0802130826g7cd82b66nc093c09f8f16016d@mail.gmail.com>




Yahoo! Answers - Get better answers from someone who knows. Try it now.