Jump to content
  • Advertisement
Sign in to follow this  
Kuro

VC++ question: msvcrtd / libcmtd conflict

This topic is 4590 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'm compiling my game with VC++ 2005 EE, using the "Debug multithreaded DLL" setting. However, I'm trying to link with the lua library (lualibd.lib), but I get a bunch of error messages that look like this: LIBCMTD.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRTD.lib(MSVCR80D.dll) So... I figured out the problem is that the .lib file that came precompiled with the lua library uses the "Debug multithreaded" setting, not the "Debug multithreaded DLL" setting, so I need to basically rebuild the source using the correct setting and then everything should work fine. However, this is an open source project, and I'm a bit hesitant to require everyone to build the Lua library themselves- they should be able to just use the pre-made lualibd.lib file. So, does anyone know of a way around this? I googled a bit and found out about the "NODEFAULTLIB" setting, but when I excluded libcmtd.lib from the project, then I got these kinds of errors: lualibd.lib(ldblib.obj) : error LNK2001: unresolved external symbol __iob So, there doesn't seem any way around it :( If anyone knows a good way to handle this I'd appreciate any tips! Thanks, Kuro

Share this post


Link to post
Share on other sites
Advertisement
When I'm using LUA in a VS-solution I add the lua-stuff as a new project and set my app to depend on tha lua-libs. This way lua will be built when you build the rest of the app without any problems, hopefully. If I'm not mistaking I used projects from this solution: http://home.comcast.net/~vertigrated/lua/vs7.zip

Share this post


Link to post
Share on other sites
Alright, thanks for the help... Hmm, for now one of my teammates found some compiled .lib/.dll made by someone else which works without any problem so I'm just using that.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!