如何在 VS2013 项目配置中禁用 link 步骤?

How to disable link step in VS2013 project configuration?

我想为 VS2013 C++ 项目的特定项目配置禁用链接器。我该怎么做?

我尝试删除输出路径,删除项目文件的 <Link> 部分,但这只会导致错误消息("error : The OutputPath property is not set for project" / "error: The output paths do not match" 等)

原因是此特定配置会对文件进行预处理,因此不会创建目标文件,这总是会导致链接器错误。

有一个compiler switch/c到"compile only"。不幸的是,这仅在 Visual Studio 以外可用。因此,您需要使用 cl.exe.

在命令行上构建项目