即使Visual Studio 14 2015 Win64工具链已启用,也将32位工具链用于编译
32 bit toolchain is used for compilation even though Visual Studio 14 2015 Win64 toolchain is enabled
我试图在窗口上编译TensorFlow Cmake构建,这需要64位工具链在编译过程中不会用完存储器。但是,即使Visual Studio 14 2015 WIN64工具链在命令提示符中启用,但32位工具链也被用于汇编,这是由Task Manager明显的,该任务管理器显示了MSBuild (32 bit)
和Microsoft(R) C/C++ Compiler Driver (32 bit)
流程。因此,error: c1060: compiler is out of heap space
被抛出了一点点。
这是我到目前为止所做的:启用64位工具链,我打开VS2015 x64 Native Tools Command Prompt
。配置CMAKE时,我获得输出
-- Building for: Visual Studio 14 2015
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonLibs: C:/Users/kasper/Anaconda3/libs/python35.lib (found version "3.5.2")
-- Configuring done
-- Generating done
因此,Cmake似乎已经选择了64位编译器。futher,在命令提示中运行cl
给出
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
我还尝试在配置Cmake之前运行"C:Program Files (x86)Microsoft Visual Studio 14.0VCvcvarsall amd64"
,但无济于事。32位工具链最终仍用于编译。
我缺少什么?
执行cmake时,必须在64位版本中指定要它:
cmake -G "Visual Studio 14 2015 Win64" [...]
否则,在您的情况下,默认情况下它与
相同cmake -G "Visual Studio 14 2015" [...]
并以32位模式配置。
来自cmake -help命令行:
Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project
files.
Optional [arch] can be "Win64" or "ARM".
如果要为X64目标构建,则需要指定正确的CMake Generator:
CMake -G "Visual Studio 14 2015 Win64" ....
相关文章:
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头
- 在OSX上使用CMake将Adobe的XMP工具包构建为共享库的最简单方法是什么?
- C++:将值 int(例如:0x00AAFAD8)转换为指针(指针本身也是 0x00AAFAD8 值)
- 当将值推送到矢量时,什么也没发生
- 如何将字符串与结构(也包括字符串)进行比较?
- 为什么即使直到最后才定义实际类型,也可以将依赖名称视为完整
- 如何将模板类专用化为也接受模板模板参数
- 所有Visual Studio安装程序崩溃,可视化构建工具也无法正常工作
- 复合赋值的左侧表达式是未初始化的值.计算出的值也将是垃圾
- 使用开发工具包将文件上传到 AWS C++
- 如何使用逗号定界符处理TXT,该逗号也将逗号作为千分隔板
- 编译器是否也将所有参数依赖类型实例化,即使超载函数的参数计数不匹配
- 即使Visual Studio 14 2015 Win64工具链已启用,也将32位工具链用于编译
- 返回数组的函数,但也将函数作为参数
- 如何使用 MergeCom 工具包将 DICOM 文件发送到 PACS
- 有什么工具可以将c/c++源代码转换为html吗?
- 数组的前一行元素也将更新
- 是否有工具可以将Visual Studio对象文件转换为GCC格式?
- 有没有任何工具可以将一些C++类打包到C#中
- c++:也将派生类的重载函数作为参数调用(没有显式强制转换)