Jump to content
  • Advertisement
Sign in to follow this  
Night Elf

[LUA] Linker warnings

This topic is 4874 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!