I’ll preface this post with the disclaimer that I am only a novice in C/C++ programming and using Visual Studio.
In the course of building TRViewer [
link] the linker gave an error about not being able to open LIBC.lib.
LIBC is an old version of the Microsoft C runtime that was removed in Visual Studio 2005.
TRViewer is a Visual Studio 2003 project and so the third party libraries it uses from that era may use old Visual Studio default libraries.
It was found that the library requiring LIBC was the 3D Studio File Toolkit, ftkvc40.lib which had presumably been built in Visual C 4.0.
3D Studio File Toolkit is used to manage the 3D modelling format, *.3DS.
The quick fix was to set the linker to ignore LIBC using the /NODEFAULTLIB option.
According to posts found on the internet [
link1,
link2,
link3] the proper thing to do is to recompile the library dependent on LIBC in the same version of Visual Studio in which you are building your program.
The rebuilt library must also use the same C runtime as your program.
The C runtime that a program uses is set in the project’s property pages.
See Configuration Properties>C/C++>Code Generation>Runtime Library where you have the choice of four runtimes, /MT, /MTd, /MD or /MDd.
/MT and /MTd link to static runtimes and /MD and /MDd link to DLL runtimes.