• Advertisement
Sign in to follow this  

Luabind linker errors

This topic is 2432 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 implement luabind into a project that I'm working on, but I can't get past the numerous linker errors I'm getting. I threw together a little test to try and figure it out, but it didn't really help much.

#include <iostream>
#include <conio.h>

using namespace std;

extern "C"
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>

#include <luabind\luabind.hpp>

void test(void)
printf("I am a test!\n");

void main(void)
lua_State* state = lua_open();

// This appears to have something to do with the linker errors. Without these lines it compiles file!
luabind::def("test", test)

int result = luaL_dofile(state, "test.lua");
printf("Result: %d\n", result);



1>main.obj : error LNK2019: unresolved external symbol "int __cdecl luabind::detail::ref(struct lua_State *)" (?ref@detail@luabind@@YAHPAUlua_State@@@Z) referenced in function "public: __thiscall luabind::handle::handle(struct lua_State *,int)" (??0handle@luabind@@QAE@PAUlua_State@@H@Z)
1>main.obj : error LNK2019: unresolved external symbol "void __cdecl luabind::detail::unref(struct lua_State *,int)" (?unref@detail@luabind@@YAXPAUlua_State@@H@Z) referenced in function "public: __thiscall luabind::handle::~handle(void)" (??1handle@luabind@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "class luabind::adl::object __cdecl luabind::detail::make_function_aux(struct lua_State *,int,class boost::function1<int,struct lua_State *> const &,class boost::function1<int,struct lua_State *> const &,class boost::function2<int,struct lua_State *,char const *> const &)" (?make_function_aux@detail@luabind@@YA?AVobject@adl@2@PAUlua_State@@HABV?$function1@HPAUlua_State@@@boost@@1ABV?$function2@HPAUlua_State@@PBD@7@@Z) referenced in function "class luabind::adl::object __cdecl luabind::make_function<void (__cdecl*)(void),struct boost::mpl::vector1<void>,struct luabind::detail::null_type>(struct lua_State *,void (__cdecl*)(void),struct boost::mpl::vector1<void>,struct luabind::detail::null_type)"

I have "lua51.lib" and "luabind_d.lib" linked in.

Any help would be greatly appreciated.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement