C++ 是YDL.net';为CUDA4.0准备的Eclipse CUDA插件

C++ 是YDL.net';为CUDA4.0准备的Eclipse CUDA插件,c++,c,eclipse,eclipse-plugin,cuda,C++,C,Eclipse,Eclipse Plugin,Cuda,我刚刚在AMD64 Ubuntu 10.10机器上安装了CUDA 4.0工具包,以及Eclipse Helios。我已经成功编译了所有英伟达GPU计算SDK示例,所以我的构建系统看起来很好。但我无法在Eclipse上编译插件的Hello World CUDA模板,它似乎找不到运行库,如下所示: **** Build of configuration Release for project holamundo **** make all cc holamundo.o -o holamu

我刚刚在AMD64 Ubuntu 10.10机器上安装了CUDA 4.0工具包,以及Eclipse Helios。我已经成功编译了所有英伟达GPU计算SDK示例,所以我的构建系统看起来很好。但我无法在Eclipse上编译插件的Hello World CUDA模板,它似乎找不到运行库,如下所示:

**** 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版本的兼容性而设计,尽管我还没有对此进行测试。

请注意,现在CUDA工具包中有一个名为Nsight Eclipse的版本。它支持所有新的CUDA Toolkit 5.0功能。

您的项目似乎没有链接CUDA运行库。我想这对CUDA4.0来说并不是特别的,但我已经通过ldconfig正确地设置了LD_LIBRARY_路径。我只是不知道,Eclipse知道这个环境变量吗?LD_LIBRARY_PATH对编译没有影响,它控制在运行时如何找到共享库……感谢@talonmies的启示!这条路上的下一步是让Eclipse/插件知道库在哪里。但是在NVIDA CUDA编译器或GCC编译器下都没有C/C++Build\Settings\Libraries列表,在NVIDA CUDA编译器工作的杂项条目中添加“-L/usr/local/CUDA/lib64-lcudart”也没有。。。