报错显示:
Running /home/wc/software/cmake-3.26.3-linux-x86_64/bin/cmake /home/wc/work/junke_src/missile-sim '-GCodeBlocks - Unix Makefiles' in /home/wc/work/junke_src/build/debug.
CMake Error at /home/wc/software/cmake-3.26.3-linux-x86_64/share/cmake-3.26/Modules/CMakeDetermineCompilerId.cmake:751 (message):
Compiling the CUDA compiler identification source file
"CMakeCUDACompilerId.cu" failed.
Compiler: /usr/local/cuda/bin/nvcc
Build flags:
Id flags: --keep;--keep-dir;tmp -v
The output was:
1
查看常规消息:
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
nvcc fatal : Failed to preprocess host compiler properties.
背景:我在安装nvidia3050ti驱动时,系统给安装了GCC-7(当时我还没安装任何gcc编译器),然后,我又手动安装了GCC-8: sudo apt install g++-8 ,sudo apt install gcc-8
解决:再此手动执行:sudo apt install gcc ,sudo apt install g++
标签:bin,cmake,--,keep,flags,cuda From: https://www.cnblogs.com/RedWetPlace/p/17685977.html