21
CUDA与我的gcc版本不兼容
我在编译CUDA SDK附带的一些示例时遇到了麻烦。我已经安装了开发人员驱动程序(版本270.41.19)和CUDA工具包,然后安装了SDK(均为4.0.17版本)。 最初,它根本没有编译: error -- unsupported GNU version! gcc 4.5 and up are not supported! 我在81:/usr/local/cuda/include/host_config.h中找到负责的行,并将其更改为: //#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 6) 从那时起,我只编译了几个示例,其结尾为: In file included from /usr/include/c++/4.6/x86_64-linux-gnu/bits/gthr.h:162:0, from /usr/include/c++/4.6/ext/atomicity.h:34, from /usr/include/c++/4.6/bits/ios_base.h:41, …