CUDA 10 不支持 7 之后的 Gcc 版本 - Arch Linux 中的 Qt 错误 [英] Gcc versions later than 7 are not supported by CUDA 10 - Qt Error in Arch Linux
问题描述
我正在运行 Arch Linux 并尝试在 Qt 中构建一个项目,但是 Qt 出现以下错误:
I am running Arch Linux and trying to build a project in Qt however, Qt spits the following error:
/opt/cuda/include/crt/host_config.h:129: 错误:#error -- 不支持的 GNU 版本!不支持 7 之后的 gcc 版本!
/opt/cuda/include/crt/host_config.h:129: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!
我已经尝试过之前在这里找到的 Stack Overflow 帖子中的建议:
I have already tried a suggestion from a previous Stack Overflow post found here:
我没有使用确切的命令,因为我的 cuda 位于/opt/cuda/bin/gcc.我对 g++ 执行了相同的命令.但是,终端输出这些文件已经链接.我确实通过转到实际文件并查看其属性来确认这一点.
I did not use the exact command as my cuda is located in /opt/cuda/bin/gcc. I did the same command for g++. However, the terminal outputs that these files are already linked. I did confirm this by going to the actual file and looking at it's properties.
有人可以建议解决我的问题吗?
Can someone please suggest a solution to my issue?
推荐答案
我设法使用这两行来做到这一点,这会将 cuda 的符号链接更新为 gcc7
I managed to do so usung this two lines, this will update the symbolic links of cuda to gcc7
ln -s /usr/bin/gcc-7 /usr/local/cuda/bin/gcc
ln -s /usr/bin/g++-7 /usr/local/cuda/bin/g++
这篇关于CUDA 10 不支持 7 之后的 Gcc 版本 - Arch Linux 中的 Qt 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!