/fe(名称 EXE 文件)不起作用
/Fe (Name EXE File) is not working
我想在Windows 7,Visual Studio 2010中使用编译cpp源文件
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
当我执行以下操作时
>cl /EHs main.cpp -o test
我得到了
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
还行,很公平。我已经检查了这个页面/Fe(名称 EXE 文件(。此选项对我不起作用。它给了我这个错误
cl : Command line warning D9024 : unrecognized source file type 'test', object file assumed
main.cpp
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:main.exe
main.obj
test
LINK : fatal error LNK1181: cannot open input file 'test.obj'
现在我应该如何激活此选项?我总是觉得很难阅读MSDN Library
.它一点也不友好。
请注意,/Fe
和文件名之间没有空格。
cl /EHs /Fetest.exe main.cpp
或者,您可以使用冒号语法:
cl /EHs /Fe: test.exe main.cpp
您可以使用
以下方法实现相同的目标
cl /Ehs main.cpp /link /OUT:test.exe
/link
告诉 cl 将这些选项传递给链接器,/OUT
指定输出文件的名称。
相关文章:
- SFML 加载从文件不起作用,奇怪的错误
- 为什么写入文件不起作用
- Opencv ml 头文件不起作用
- 将数组保存到二进制文件不起作用 c++
- C++输出流到文件不起作用
- 使用 bazel 构建 TensorFlow C++调用模型时,.so 文件不起作用
- C++接口(标头)和实现文件不起作用
- 二进制文件:ios ::二进制文件不起作用
- 解密AES-256加密文件不起作用
- MinGW .h 编译文件不起作用:此文件的版本与您运行的 Windows 版本不兼容
- 在 Linux 中使用 C++ 列出目录的所有文件不起作用
- 以二进制模式写入文件不起作用
- Android NDK 中的某些 c++ 包含文件不起作用
- 通过 Makefile 编译 2 个文件不起作用
- 标头和源类文件不起作用
- 线程清理器的抑制文件不起作用:出了什么问题
- 我的生成文件不起作用
- c++fileIO创建/打开文件不起作用
- C++ 使用文件不起作用初学者
- 在QtCreator中逐行读取文本文件不起作用