lua-users home
lua-l archive

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



Might be you compiled the library as C++ but still use 'extern "C"' to access it? The fact that DevCpp treats any '*.C' files (with uppercase suffix) automatically as C++ source does not help here. I hope they didn't but they seem fixed doing so.

So: change names to lowercase, ensure you compile/link either as ANSI C (i'd recommend) or C++.

-ak


Milo Spirig kirjoittaa torstaina, 8. toukokuuta 2003, kello 20:03:

Hi

Im trying to compile LUA 5.0 as a static library with dev-cpp (gcc 3.2)
under Windows. I added all the files from the src und src/lib directory to the project und compiled it. Then I linked this library to my test project und compiled again, but now I'm getting a linker error for all the lua calls
like:


[Linker error] undefined reference to `lua_open'

../src/ ai_lua.o(.text$get_registry__Q37luabind6detail14class_registryP9lua_S
tate+0x25):ai_lua.cpp: undefined reference to `lua_gettable'


../src/ ai_lua.o(.text$stage1__Q37luabind6detail12create_classP9lua_State+0x1
0):ai_lua.cpp: undefined reference to `lua_gettop'

../src/ ai_lua.o(.text$is_class_object__Q27luabind6detailP9lua_Statei+0x7e):a
i_lua.cpp: undefined reference to `lua_settop'

...

(and I'm sure I linked the library correctly)

Can anybody help me?

thanks
Milo