开发者

How to solve "cannot open file 'LIBCD.lib' " in visual studio 2008?

开发者 https://www.devze.com 2023-03-31 02:26 出处:网络
trying to compile some code i download开发者_如何学编程ed, i get link error LNK1104: cannot open file \'LIBCD.lib\'. i cant find this file anywhere on my computer. what is it, and can i download it fr

trying to compile some code i download开发者_如何学编程ed, i get link error LNK1104: cannot open file 'LIBCD.lib'. i cant find this file anywhere on my computer. what is it, and can i download it from somewhere? is there another way to get the code to work?


In my case, I only wrote "LIBCD.lib" in Configuration Properties -> Linker -> Input -> Ignore Specific Library


The first hit on Google for libcd says:

This file is the static library for the debug single threaded version of the C runtime. Visual Studio 2005 no longer supports this version of the C runtime: instead you need to use the multi-threaded version (libcmtd.lib) or the dynamically linked (DLL) version (msvcrtd.lib).

To fix this problem you will need to change the makefile that comes with GLUI to get it to use a different version of the library.

and some other things that might help you.


You can fix this from the project settings. You need to add the /NODEFAULTLIB to the linker settings:

core.2f.nodefaultlib.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/core.2f.nodefaultlib.asp

This option will make the linker ignore all the /DEFAULTLIB directives - this will remove the dependency on libcd.lib. Unfortunately it will remove all the other dependencies as well so you will need to explicitly add the libraries you do need (like glut32.lib etc.) as inputs to the linker.

0

精彩评论

暂无评论...
验证码 换一张
取 消