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,
<><>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?>>

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