sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

LNK2001 errors after calling sol code

Open JannesBonk opened this issue 2 years ago • 0 comments

I'm trying to implement Lua scripting in my game, and if I try to define/call a sol function, the compiler throws up alot of LNK2001 errors such as : scripting.obj : error LNK2001: unresolved external symbol __imp_luaL_traceback@@16 Example of code :

#include <iostream>
#include <sol/sol.hpp>

void setupLua(sol::state* luaState) noexcept
{
        luaState.open_libraries(sol::lib::base);
}

After I deleted sol::state* luaState and luaState.open_libraries(sol::lib::base);, I don't get any LNK2001 errors. I use visual studio 2022 with vcpkg includes . Any help will be apreciated

JannesBonk avatar Jun 27 '23 14:06 JannesBonk