我的项目有问题,也许有人可以给我一些提示。我在解决方案中有一个项目,该项目是上次使用Visual Studio 2015
. 现在,我想用Visual Studio 2017
.
%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat amd64
所以,我用参数启动批处理文件。然后,我使用命令升级项目devenv solution.sln /Upgrade
。我看到以下输出:
Microsoft Visual Studio 2017 Version 15.0.27703.1.
Copyright (C) Microsoft Corp. All rights reserved.
Upgrading project 'project1'...
Configuration 'Debug|Win32': changing Platform Toolset to 'v141' (was 'v140').
Configuration 'Debug|x64': changing Platform Toolset to 'v141' (was 'v140').
Configuration 'Release|Win32': changing Platform Toolset to 'v141' (was 'v140').
Configuration 'Release|x64': changing Platform Toolset to 'v141' (was 'v140').
Migration completed successfully, but some warnings were detected during migration.
For more information, see the migration report:
C:\path\to\project\UpgradeLog.htm
在这个UpgradeLog.htm
,我只看到这个警告:
solution.sln: Visual Studio needs to make non-functional changes to this project in order to enable the project to open in released versions of Visual Studio newer than Visual Studio 2010 SP1 without impacting project behavior.
然后,在构建项目时,我在构建项目时看到此消息(我在这里删除了真实的项目名称,源文件的名称和真实的路径。这应该没有问题):
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\CL.exe /c /Iinclude /IC:\path\to\other\include /Zi /nologo /W3 /WX- /diagnostics:classic /MP /O2 /Ob2 /Ot /Oy- /GL /D WIN64 /D NDEBUG /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Release\x64\\" /Fd"C:\path\to\debug\symbols\debug.pdb" /Gd /TP /FC /errorReport:queue c1.cpp c2.cpp c3.cpp
c1.cpp
c2.cpp
c3.cpp
Unknown compiler version - please run the configure tests and report the results
Unknown compiler version - please run the configure tests and report the results
Unknown compiler version - please run the configure tests and report the results
Lib:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\Lib.exe /OUT:"C:\path\to\lib\project.lib" some_other.lib /LIBPATH:C:\path\to\other\lib64 /NOLOGO /MACHINE:X64 /LTCG Release\x64\c1.obj
Release\x64\c2.obj
Release\x64\c3.obj
但后来,当我使用命令在文件project.lib
中搜索时,我得到了这个输出(几次):_MSC_VER
find "_MSC_VER" project.lib
/FAILIFMISMATCH:"_MSC_VER=1900"
但我希望得到这个输出(因为用 构建Visual Studio 2017
):
/FAILIFMISMATCH:"_MSC_VER=1910"
这怎么可能?