无法编译CUDA示例:ld:找不到-lgomp clang的库:错误:链接器命令失败,退出代码为1

时间:2014-11-24 19:15:15

标签: sdk cuda makefile openmp

我试图编译CUDA样本。如果我cd到示例,然后运行make,它会给我一个错误:

macair93278:samples r8t$ cd 0_Simple/UnifiedMemoryStreams/
macair93278:UnifiedMemoryStreams r8t$ ls
Makefile        Makefile-e      NsightEclipse.xml   UnifiedMemoryStreams.cu readme.txt
macair93278:UnifiedMemoryStreams r8t$ make

有几个警告,然后

clang: warning: argument unused during compilation: '-fopenmp'
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-----------------------------------------------------------------------------------------------
WARNING - OpenMP is unable to compile
-----------------------------------------------------------------------------------------------
This CUDA Sample cannot be built if the OpenMP compiler is not set up correctly. 
This will be a dry-run of the Makefile.
For more information on how to set up your environment to build and run this sample, please refer the CUDA Samples documentation and release notes 

感谢您的帮助。

0 个答案:

没有答案