c++ - 警告 MSB8012 - 在 Visual Studio 2015 上构建 Visual Studio 2003 项目

标签 c++ visual-studio visual-c++ visual-studio-2015 visual-studio-2003

我正在尝试在 Visual Studio 2015 上构建一个 Visual Studio 2003 项目 (SimpleIni)。

打开项目后,它为我提供了自动升级它的选项。 但是升级后我无法构建解决方案并收到以下警告:

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1189,5): warning MSB8012: TargetPath(E:\abc\VisualStudioCpp\test\simpleini-master\Debug Unicode\SimpleIni.exe) does not match the Linker's OutputFile property value (E:\abc\VisualStudioCpp\test\simpleini-master\Debug Unicode\testsi.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1191,5): warning MSB8012: TargetName(SimpleIni) does not match the Linker's OutputFile property value (testsi). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>ConvertUTF.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification

我浏览了以下链接:

warning MSB8012 : make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile)

How do I fix warning MSB8012 in a static library project in Visual C++ 2010?

但是我找不到如何在 Visual Studio 2015 上更改链接器设置。

谁能告诉我如何在 Visual Studio 2015 上构建 Visual Studio 2003 项目?

最佳答案

要解决此问题,您应该按如下方式更改项目的选项:

General tab -> Target Name = SimpleIni, Target Extension = .exe

同样在“常规”选项卡上检查项目的应用程序类型是否为应用程序

所附屏幕截图中标记的所有这些选项: enter image description here

Linker tab -> All parameters -> Output file -> $(OutDir)$(TargetName)$(TargetExt)

此选项在下面的屏幕截图中有标记: enter image description here

关于c++ - 警告 MSB8012 - 在 Visual Studio 2015 上构建 Visual Studio 2003 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39097873/

相关文章:

visual-c++ - 如何将 MFC CString 与 boost 字符串算法库一起使用

c++ - 相同的代码, vector 更改为 unordered_set 时出错

c# - C++中推荐的++或+1是什么?

visual-studio - 如何在 VS2019 CMAKE 中使用 Clang-CL LLVM?

c# - 为什么 context.SaveChanges() 更新表中的每一行?

c++ - stb 图像加载库返回白色纹理

c++ - 将 vector<char> 前 N 个元素转换为整数

c++ - 未定义结构的静态常量成员

C++ 使用二维数组

c# - 为什么将 Visual Studio 作为 "Run as Administrator"运行?