• Linker error 2001?
    0 replies, posted
Hello, facepunch. I have recently began coding Garry's Mod C++ modules with SourceSDK and the lua headers. But when I use function declared in SourceSDK files (convar.h, icvar.h) like Warning, DevMsg, Msg and the cvar pointer it will throw these linker errors: [code] 1>Atlas.obj : error LNK2001: unresolved external symbol __imp__Msg error LNK2001: unresolved external symbol __imp__Warning error LNK2001: unresolved external symbol "class ILuaInterface * g_Lua" (?g_Lua@@3PAVILuaInterface@@A) error LNK2001: unresolved external symbol _cvar[/code] [code]bool ChangeCvar(const char * GFCvar, int CVal) { try { ConVar *CCvar = cvar->FindVar(GFCvar); CCvar->AddFlags(0); CCvar->SetValue(CVal); return true; } catch(char * str) { Warning("Edit CVAR Error: %s", str); return false; } }[/code] Sorry if this is a low quality post I just couldn't find anything searching.
Sorry, you need to Log In to post a reply to this thread.