我刚刚安装了 CUDA 4.0 工具包,还有 CUDA plugin适用于 AMD64 Ubuntu 10.10 机器上的 Eclipse Helios。我已经能够成功编译所有 NVIDIA GPU Computing SDK 示例,因此我的构建系统看起来不错。但是我无法使插件的Hello World CUDA模板在Eclipse上编译,它似乎没有找到运行时库,如下所示:
**** Build of configuration Release for project holamundo ****
make all
cc holamundo.o -o holamundo
holamundo.o: In function `__sti____cudaRegisterAll_44_tmpxft_000022c4_00000000_4_holamundo_cpp1_ii_main()':
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0xa): undefined reference to `__cudaRegisterFatBinary'
holamundo.o: In function `main':
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0x7d): undefined reference to `cudaMalloc'
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0xca): undefined reference to `cudaConfigureCall'
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0xe9): undefined reference to `cudaMemcpy'
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0x256): undefined reference to `cudaFree'
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0x273): undefined reference to `HelloWorld_kernel(int, char*)'
holamundo.o: In function `__cudaUnregisterBinaryUtil()':
tmpxft_000022c4_00000000-1_holamundo.cudafe1.cpp:(.text+0x38): undefined reference to `__cudaUnregisterFatBinary'
holamundo.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [holamundo] Error 1
有没有人已经尝试过将插件与 CUDA 工具包的 4.0 版一起使用?看起来好像它是专为版本 3.x 兼容性而设计的,尽管我没有对此进行测试。
最佳答案
请注意,现在 Nsight Eclipse Edition 是 CUDA Toolkit 的一部分。它支持所有新的 CUDA 工具包 5.0 功能。
关于c++ - YDL.net 的 Eclipse CUDA 插件是否已为 CUDA 4.0 做好准备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7494546/