我想使用Visual Studio 2015 x64从命令行构建英特尔线程构建模块。我从last stable version下载了https://www.threadingbuildingblocks.org/。
目录tbb2017_20161128oss\build\vs2012
除了一些其他文件外还包含:
makefile.sln
tbb.vcxproj
tbbmalloc.vcxproj
tbbmalloc_proxy.vcxproj
要构建TBB的Debug版本,我在VS2015 x64 Native Tools Command Prompt
:
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
时,会弹出这些窗口:
如果我点击" OK"按钮并再次重试env makefile.sln /build Debug /project tbb
一切正常。
由于我计划在几台计算机上构建TBB,因此这个手动任务很烦人。可以避免吗?有没有办法从命令行升级解决方案?