我正在尝试在 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
我浏览了以下链接:
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
同样在“常规”选项卡上检查项目的应用程序类型是否为应用程序。
Linker tab -> All parameters -> Output file -> $(OutDir)$(TargetName)$(TargetExt)
关于c++ - 警告 MSB8012 - 在 Visual Studio 2015 上构建 Visual Studio 2003 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39097873/