【问题标题】:How to build TBB using VS2015 x64 from the command line?如何从命令行使用 VS2015 x64 构建 TBB?
【发布时间】:2017-02-05 00:58:38
【问题描述】:

我想使用 Visual Studio 2015 x64 从命令行构建英特尔线程构建模块。我从https://www.threadingbuildingblocks.org/ 下载了last stable version

目录tbb2017_20161128oss\build\vs2012 包含一些其他文件:

makefile.sln 
tbb.vcxproj 
tbbmalloc.vcxproj 
tbbmalloc_proxy.vcxproj

为了构建 TBB 的调试版本,我在 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 时,会弹出这些窗口:

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

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

【问题讨论】:

  • 还有另一种对 TBB 更自然的方法:下载 gmake.exe for windows 并使用 makefile 构建。

标签: visual-studio-2015 build tbb devenv


【解决方案1】:

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

顺便说一句,您可以从 Download 页面获取二进制文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多