CUDA 8 nvcc在macOS Sierra上失败,在stdio.h, stdlib.h和其他标头中出现错误



我有一台安装了Xcode 7.3.1和Xcode 8.0的Mac开发机。

升级到CUDA 8后,我设置系统使用Xcode 7.3.1命令行工具,因为nvcc 8.0目前不支持Xcode 8命令行工具。

从OS X 10.11 El Capitan更新到macOS 10.12 Sierra后,我无法再用CUDA 8编译hello world程序。

编译失败,输出包含数百行/usr/include头文件,以:

开头
/usr/include/stdio.h(133): error: expected a ")"
/usr/include/stdio.h(134): error: expected a ")"
/usr/include/stdio.h(134): error: "_Nullable" has already been declared in the current scope

我下载并重新安装了似乎在操作系统更新中损坏的Command Line Tools (OS X 10.11) for Xcode 7.3.1

nvcc 8.0现在可以正常工作了

相关内容

最新更新