Compiling C++ Program Causes quot;Fatal Error LNK1104quot;(编译C++程序导致“致命错误LNK1104)
问题描述
我正在尝试在命令提示符下使用以下命令编译 C++ 应用程序:
I am trying to compile a c++ application using the following command in command prompt:
cl -I"c:Program filesJavajdk1.5.0_07include" -I"c:program filesjavajdk1.5.0_07includewin32" -MD -LD HelloWorld.cpp -FeHelloWorld.dll
然而,这会产生以下错误:
However, this produces the following error:
链接:致命错误 LNK1104:无法打开文件MSVCRT.lib"
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
您对导致这种情况的原因以及解决方法有任何想法吗?
Have you any ideas of what is causing this and how to fix it?
我在 Windows 上安装了 Visual Studio 2005.
I have visual studio 2005 installed on windows.
谢谢,
-皮特
推荐答案
链接:致命错误 LNK1104:无法打开文件MSVCRT.lib"
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
关于是什么导致这种情况以及如何解决它的任何想法?
Any ideas of what is causing this and how to fix it?
链接器需要指向 MSVCRT.lib 的位置,因为它似乎不在您的 LIBPATH 中.
The linker needs to be pointed to the location of MSVCRT.lib, as it doesn't seem to be in your LIBPATH.
它应该在这里:C:Program FilesMicrosoft Visual Studio 7VClib
添加-link -LIBPATH:C:Program FilesMicrosoft Visual Studio 8VClib"
这篇关于编译C++程序导致“致命错误LNK1104"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:编译C++程序导致“致命错误LNK1104"


- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01
- 静态初始化顺序失败 2022-01-01
- Stroustrup 的 Simple_window.h 2022-01-01
- 从python回调到c++的选项 2022-11-16
- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- C++ 协变模板 2021-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- STL 中有 dereference_iterator 吗? 2022-01-01
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- 近似搜索的工作原理 2021-01-01