I know there's a lot of question like this one, but no one of those answers help me to solve my problem. What problem? Well, when linking, after compiling my project I receive this:
fatal error LNK1104: cannot open file 'MSVCRT.lib'
I'm using CodeBlocks under Windows 8 64-bit. Compiling with the Visual C++ 2003 Toolkit compiler, which I have installed under C:\Program Files (x86)\Visual C++ 2003 Toolkit and using a lot functions from the Windows API, which I also have installed under C:\Program Files (x86)\Windows Kits).
Searching on the internet I found some solutions like to link this library (MSVCRT.lib) under my project settings, but I definitely don't have that file. This is a project (the one in which I'm receiving this error) that I was working on about 15 days ago, and now I want to resume its development. I compiled and linked this project a lot of times, and I never got this linker error, I don't know why now I just can't link it.
Some solutions say I need to install VS.NET so the MSVCRT.lib file will be there, but I never had that installed and I was able to compile and link my project!
Any ideas on how can I solve this without installing VS.NET (also, I don't know if this is going to work)?
After 2 years, I finally found the solution in my case.
In CodeBlocks, under Project > Build Options > Compiler Flags, remove Multi-threaded DLL Runtime Library [/MD] and rebuild.
What just did it for me, was to delete the .sdf and .suo files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With