Search code examples
visual-c++static-linking

Ignore "defaultlib"-directives in specific .lib-file


I'm trying to build a Win32 application, which is to use a 3rd party .lib. I get errors that "LIBC" is not found (I'm using Visual C++ 2010 express), and i've tracked this reference to the 3rd party lib. Adding "/NODEFAULTLIB" solves the reference to LIBC, but in turn provides a plethora of missing symbols (of course). I know that LIBC is single-threaded, and can give all sorts of head-aches, but right now i'm just trying to get a succesful link.

Best regards, Soren


Solution

  • There, I fixed it!

    It seems I just had to open my eyes, going to: Project->Properties->Linker->Input

    I just needed to add "libc" to the "Ignore Specific Default Libraries", instead of just enabling "Ignore All Default Libraries".

    The thing even works (just did a quick run). There may of course be hidden errors due to the multithreaded version of standard C libraries being used, but so far so good!