[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: tolua++
- From: "Stefan Boberg" <Stefan.Boberg@...>
- Date: Thu, 12 Oct 2006 09:36:26 +0200
tolua_image_open needs to be declared as extern "C" so that the
compiler doesn't mangle the symbol name.
/Stefan
> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-
> bounces@bazar2.conectiva.com.br] On Behalf Of Wesley Smith
> Sent: 12 October 2006 07:49
> To: Lua list
> Subject: tolua++
>
> I don't know if this is the best place to ask or not, but I'm trying
> to open a C++ based module wrapped with tolua++. My problem is that
> the linker can't find the openlib function that creates the module
> table despite the object file from the compiled source being included
> in the linking command. I checked what symbols are in the .o file
> with "nm Lua_image.o". And since the linker doesn't lie, indeed there
> isn't a _tolua_image_open symbol which would point to this function:
>
> TOLUA_API int tolua_image_open (lua_State* tolua_S);
>
> There are however some C++ mangled symbols like:
> 00004e5c T __Z13luaopen_imageP9lua_State
> 00000000 A __Z13luaopen_imageP9lua_State.eh
>
> Does anyone have any experience with this problem? If I don't compile
> the file as C++, I get massive errors. Any ideas?
>
> thanks,
> wes