|
|
||
|
Miles Bader escribió:
For my file "foo.i", swig generates "luaopen_foo". I think swig gets
the name "foo" from the %module commnad in the .i file; do you have a
line like "%module ClassA" in your .i file?
Anyway, since swig generate C code, you can easily look at it and see
what it's doing. In my version of swig, it outputs some lines like:
#define SWIG_name "foo"
#define SWIG_init luaopen_foo
#define SWIG_init_user luaopen_foo_user
... and then later in that file defines:
#ifdef __cplusplus
extern "C" {
#endif
SWIGEXPORT int SWIG_init(lua_State* L)
{
...
}
with the reuslt of defining an exported function called "luaopen_foo".
Then, whats the correct way to use that function? When I search the file
I find the define SWIG_init luaopen_foo, but when I link I got an error
about undefined reference.
-Miles
-- http://dsgp.blogspot.com | Linux, programación, juegos Have no place I can be since I found Serenity But you can’t take the sky from me______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com