Linking errors when lua compiled as C++

Roman Senuta <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello,

  I have a problem with linking my application with luabind and lua 
libraries when lua library is compiled as C++ code. Linker gives a lot 
of undefined reference errors to lua functions:

luabind_lib/libluabind.a(exception_handler.cpp.o): In function 
`luabind::detail::(anonymous 
namespace)::push_exception_string(lua_State*, char const*, char const*)':
exception_handler.cpp:(.text+0x23): undefined reference to `lua_pushstring'
exception_handler.cpp:(.text+0x36): undefined reference to `lua_pushstring'
exception_handler.cpp:(.text+0x49): undefined reference to `lua_pushstring'
...

Problem is in lua_include.hpp header. It includes lua headers inside 
extern "C" declaration. I had to hack it to make linking right. Is there 
any way to do it better without altering luabind's source code?

--
Roman

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.