Thursday, June 25, 2009

Visual Studio 2005 & 2008: fatal error LNK1104: cannot open file 'LIBC.lib'

Symptom:

You tried to re-build an old Visual Studio 6.0 C or C++ project in Visual Studio 2005 or 2008 and you get the following error:

Fatal error LNK1104: cannot open file 'LIBC.lib'

Root Cause:

LIBC.LIB is no longer supported in the later version of Microsoft Visual Studio product.

Possible Fix:

Use the Multi-Thread-Safe version LIBCMT.LIB instead of LIBC.LIB that may fix.

  • Go to the Project property page.
  • Go to Linker on the left tree view panel
  • Open the Input node
  • In the "Additional Dependencies" you will find LIBC.lib, replace that with LIBMT.lib
Rebuild your project.

No comments: