编译C ++程序导致“致命错误LNK1104” [英] Compiling C++ Program Causes "Fatal Error LNK1104"
问题描述
我试图在命令提示符下使用以下命令编译c ++应用程序:
cl -Ic:\Program files\Java\jdk1 .5.0_07\include-Ic:\program files\java\jdk1.5.0_07\include\win32-MD -LD HelloWorld.cpp -FeHelloWorld.dll
但是,这会产生以下错误:
LINK:致命错误LNK1104:无法打开文件'MSVCRT.lib'
有什么原因导致这个问题以及如何修复它?
我在windows上安装了visual studio 2005。
感谢,
-Pete
LINK:致命错误LNK1104:无法打开文件'MSVCRT.lib'
修复它?
链接器需要指向MSVCRT.lib的位置,因为它似乎不在您的LIBPATH。
应该在这里: C:\Program Files\ Microsoft Visual Studio 7 \VC\lib p>
添加 -link -LIBPATH:C:\Program Files \ Microsoft Visual Studio 8 \VC\lib
I am trying to compile a c++ application using the following command in command prompt:
cl -I"c:\Program files\Java\jdk1.5.0_07\include" -I"c:\program files\java\jdk1.5.0_07\include\win32" -MD -LD HelloWorld.cpp -FeHelloWorld.dll
However this produces the following error:
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
Any ideas of what is causing this and how to fix it?
I have visual studio 2005 installed on windows.
Thanks,
-Pete
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
Any ideas of what is causing this and how to fix it?
The linker needs to be pointed to the location of MSVCRT.lib, as it doesn't seem to be in your LIBPATH.
It should be here: C:\Program Files\Microsoft Visual Studio 7\VC\lib
Add -link -LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib"
这篇关于编译C ++程序导致“致命错误LNK1104”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!