Jump to content
  • Advertisement
Sign in to follow this  
Mantear

MSVC 2005 Express - LIBC.lib

This topic is 4857 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 porting over a MSVC6 project to MSVC2005 Express, and have a linking error that I can't quite figure out. The error is:
fatal error LNK1104: cannot open file 'LIBC.lib'
I've found in the documentation that libc.lib is the single-threaded CRT and is no longer available. Instead, I should be using the multithreaded libs. However, no matter what I try, it keeps wanting to link against libc.lib and fails. I've changed the Project->Properties->Configuration Properties->C/C++->Code Generation->Runtime Library to /MD, /MDd, /MT, and /MTd, but it keeps wanting to link against libc.lib. Any ideas? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Are you using any third party libs? I spent quite some time with this until I finally figured that glew was the problem and despite the website claiming otherwise at least the static lib was for some reason linking to it (dynamic worked fine). Rebuilding it helped.

In other words: make sure that you don't use any libs that are linking to it.

Share this post


Link to post
Share on other sites
I am using the GLee.lib, which may be trying to link to it. I tried to include the source file at first, but visual studio didn't like me mixing C and C++ files (GLee is C, my project is C++). How would I go about fix this? Should I include the old LIBC.lib so that the GLee.lib can use it? Or should I try to include the source and recompile GLee? (if so, how would I go about doing that?)

I tried taking the old version of LIBC.lib from my MSVC6 directory and using that, but I ended up crashing pretty hard when using a std::vector.

Share this post


Link to post
Share on other sites
Try rebuilding the project from scratch in VS8. I've had weird problems with trying to import projects before, where magical libs appear out of nowhere. (LIBC is the single threaded statically linked runtime, by the way. I don't think VS8 even supports it anymore.)

Share this post


Link to post
Share on other sites
AFAIK you can't use libc anymore with VS 2005. So yes, your only option seems to be recompiling GLEE from source.

edit: Beaten, pretty hard.

Share this post


Link to post
Share on other sites
I have gone through the process of rebuilding the project from scratch. I had the window creation, etc, all working again. But when I got to the point where I had to add in the engine, it was pretty much an all or nothing inclusion of source code. Part of that being including the GLee lib.

I've got the source for GLee, but it's written in C and the compiler really didn't like mixing C with C++. Can I simply rename the file to .cpp and try to resolve any other compile issues that may pop up? Or is that really asking for trouble.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mantear
I've got the source for GLee, but it's written in C and the compiler really didn't like mixing C with C++. Can I simply rename the file to .cpp and try to resolve any other compile issues that may pop up? Or is that really asking for trouble.

I compile GLee directly into my projects as a header/source pair, and the only problems I've had are a couple deprecation warnings and a few 64 bit warnings. I disable the former as a matter of course, and I don't see the latter very often since it's rare to do a full rebuild and that code usually doesn't change.

Share this post


Link to post
Share on other sites
I don't know where it is in VS 2005, but you probably want Debug-Multithreaded class libraries in the project properties under C/C++ code generation.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!