Advertisement Jump to content


This topic is now archived and is closed to further replies.


Errors with Luabind bindings

This topic is 5478 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to write some Lua bindings for some Ogre classes using Luabind but I''m getting errors. My bindings are: luabind::module(L) [ luabind::class_("LogManager") .def(luabind::constructor<>()) luabind::def("getSingleton", &LogManager::getSingleton) ]; The error is: D:\Development\ogre\ogrenew\PlugIns\LuaScriptManager\src\LuaScriptManager.cpp(66) : error C2143: syntax error : missing '']'' before ''tag::id'' And I really don''t know why it won''t compile. Any suggestions? Also how would I create the defenition for a class with overloaded functions? I''ve tried so many things (and deleted the code in frustration). COuld someone post an example please? Thanks

Share this post

Link to post
Share on other sites
could it be because of the luabind::def() call?
from looking at my code it seems that .def is a function for a class_<> object (btw, u appear to me missing the ''type'' of the class, althought that could be down to a loss of the < and > tags by the forum), so is should probably look like :

.def("getSingleton", &LogManager::getSingleton)

Share this post

Link to post
Share on other sites
I think I already tried that one. I don''t actually need a binding for the constructor but this is the error I get with your code:

..\luabind\luabind/class.hpp(1066) : error C2660: ''overload_rep::overload_rep'' : function does not take 2 parameters
..\luabind\luabind/class.hpp(1143) : see reference to function template instantiation ''void __cdecl luabind::class_ified>::internal_def_s::apply(const char *,class Ogre::LogManager &(__cdecl *)(void),struct luabind::class_base *)'' being compiled
Error executing cl.exe.

Thanks for your help.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!