• Advertisement
Sign in to follow this  

[LUA] Linker warnings

This topic is 4779 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 get warning LNK4204 each time I build my application for each of the objects in lua.lib (lapi.obj, lcode.obj, ldebug.obj, ....) Is says something about debug information being missing. Why may this be happening and how could I correct the problem?

Share this post


Link to post
Share on other sites
Advertisement
You should link LUA debug libraries when building a debug build and the release libraries when building a release build. Like this:


#ifdef _DEBUG // Debug build
#pragma comment(lib, "Source/Lua/Luad.lib")
#pragma comment(lib, "Source/Lua/Lualibd.lib")
#endif else
#ifdef NDEBUG // Release build
#pragma comment(lib, "Source/Lua/Lua.lib")
#pragma comment(lib, "Source/Lua/Lualib.lib")
#endif


Share this post


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

  • Advertisement