Visual studio 2015 如何从命令行使用VS2015 x64构建TBB?

Visual studio 2015 如何从命令行使用VS2015 x64构建TBB?,visual-studio-2015,build,tbb,devenv,Visual Studio 2015,Build,Tbb,Devenv,我想使用Visual Studio 2015 x64从命令行构建Intel线程构建块。我从下载了 目录tbb2017\u 20161128oss\build\vs2012除包含一些其他文件外,还包含: makefile.sln tbb.vcxproj tbbmalloc.vcxproj tbbmalloc_proxy.vcxproj 为了构建TBB的调试版本,我在VS2015 x64 Native Tools命令提示符中尝试了以下命令: Devenv makefile.sln /buil

我想使用Visual Studio 2015 x64从命令行构建Intel线程构建块。我从下载了

目录
tbb2017\u 20161128oss\build\vs2012
除包含一些其他文件外,还包含:

makefile.sln 
tbb.vcxproj 
tbbmalloc.vcxproj 
tbbmalloc_proxy.vcxproj
为了构建TBB的调试版本,我在
VS2015 x64 Native Tools命令提示符中尝试了以下命令:

Devenv makefile.sln /build Debug /project tbb
但我得到了以下错误:

Microsoft Visual Studio 2015 Version 14.0.25420.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: tbb, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1>  generating tbb.def file
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(172,5): error MSB6006: "cmd.exe" exited with code -1073741515.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
这里的问题是VS2012文件需要升级。当我手动打开文件
makefile.sln
时,会弹出以下窗口:

如果我点击“确定”按钮并再次重试
env makefile.sln/build Debug/project tbb
,一切正常


因为我计划在几台计算机上建立TBB,所以这个手工任务很烦人。可以避免吗?有没有办法从命令行升级解决方案?

您应该在生成命令之前运行
devenv makefile.sln/upgrade


顺便说一句,您可以从第

页获取二进制文件。对于TBB,还有另一种更自然的方法:下载适用于windows的gmake.exe并使用makefiles进行构建。