sol2
sol2 copied to clipboard
LNK2001 errors after calling sol code
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