Sign in to follow this  

[LUA] Linker warnings

This topic is 4708 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
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

This topic is 4708 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this