I am getting trouble compiling a project, basically linking the objects. The linker complains:
$ g++ -o bin/program obj/linux64/Debug/src/main.o [... more object files ...] ../../../addons/obj/linux64/Debug/ofxLua/libs/lua/lua/lapi.o [...many other object files and libraries...]
../../../addons/obj/linux64/Debug/ofxLua/libs/luabind/src/scope.o: In function `~lua_pop_stack':
../../../addons/ofxLua/libs/luabind/src/scope.cpp:122: undefined reference to `lua_settop(lua_State*, int)'
[...many more undefined reference errors...]
But if I inspect the object file I find the symbol:
$ nm ../../../addons/obj/linux64/Debug/ofxLua/libs/lua/lua/lapi.o | grep lua_settop
000000000000045c T lua_settop
I checked that g++ arguments are correctly ordered.
What can be the cause of this behavior? The only explanation I can think of is that somehow the headers used from different source files are altered somehow by previous includes or defines. Is there any way I can check the resulting complete symbol so I can be sure that's the case?