Re: Linking errors when lua compiled as C++
Roman Senuta <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
> No not right now. I suppose we could have a define for it,
LUABIND_CPLUSPLUS_LUA or something, and wrap the extern "C" lines in an
> ifdef. Want do contribute a patch?
Yep, that's exactly what I've done. Here is the patch:
--- luabind/lua_include.hpp 2010-01-04 02:08:15.000000000 +0300
+++ luabind/lua_include.hpp 2010-02-26 14:50:23.000000000 +0300
@@ -23,11 +23,17 @@
#ifndef LUA_INCLUDE_HPP_INCLUDED
#define LUA_INCLUDE_HPP_INCLUDED
+#ifndef LUABIND_CPLUSPLUS_LUA
extern "C"
{
+#endif
+
#include "lua.h"
#include "lauxlib.h"
+
+#ifndef LUABIND_CPLUSPLUS_LUA
}
+#endif
#endif
--
Roman
------------------------------------------------------------------------------
Download Intel® 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
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lua_include.patch
(text/plain, 372 B)
--- luabind/lua_include.hpp 2010-01-04 02:08:15.000000000 +0300
+++ luabind/lua_include.hpp 2010-02-26 14:50:23.000000000 +0300
@@ -23,11 +23,17 @@
#ifndef LUA_INCLUDE_HPP_INCLUDED
#define LUA_INCLUDE_HPP_INCLUDED
+#ifndef LUABIND_CPLUSPLUS_LUA
extern "C"
{
+#endif
+
#include "lua.h"
#include "lauxlib.h"
+
+#ifndef LUABIND_CPLUSPLUS_LUA
}
+#endif
#endif