C++/CUDA integration with Code::Blocks

Hi,

i was trying to compile my windows project on Linux to test speed differences, so i ended using C::B because the CUDA guide for Eclipse was totally outdated… (sdk 1.0)

Anyway i found a really good tutorial there:

http://benbarsdell.blogspot.com/2009/03/cu…ngs-second.html

but i followed all the instructions correctly, and it won’t work… i get these errors, for each *.cu file:

Compiling: cuda/BlurKernel.cu

g++: /media/disco_dati/DEV/CRender/cuda/BlurKernel.cu: linker input file unused because linking not done

Compiling: cuda/LightingKernels.cu

g++: /media/disco_dati/DEV/CRender/cuda/LightingKernels.cu: linker input file unused because linking not done

Compiling: cuda/LowRangeKernel.cu

g++: /media/disco_dati/DEV/CRender/cuda/LowRangeKernel.cu: linker input file unused because linking not done

Compiling: cuda/Rasterizer.cu

g++: /media/disco_dati/DEV/CRender/cuda/Rasterizer.cu: linker input file unused because linking not done

Linking console executable: bin/linux/Debug/CRender

g++: bin/Debug/cuda/BlurKernel.o: No file o directory

g++: bin/Debug/cuda/LightingKernels.o: No file or directory

g++: bin/Debug/cuda/LowRangeKernel.o: No file or directory

g++: bin/Debug/cuda/Rasterizer.o: No file or directory

Process terminated with status 1 (0 minutes, 0 seconds)

0 errors, 0 warnings

It looks exactly like if it is not using NVCC at all…

any ideas?

No ideas? :unsure:

This other post on the same board has more details:

http://benbarsdell.blogspot.com/2009/03/cu…ngs-second.html

Mark

Ops, I meant to link that one in the first place :rolleyes:

So… let’s flip the question:

what is for you the best way to integrate C++ with Cuda under linux?

I would like something like VC++, where no on-build actions are required… in fact i stumbled on CodeBlocks because it looked very VC-like.

so if there is another ide/tool that makes integration easier i would be interested anyway!

codeblocks is the best i’ve found so far for linux.

to fix your problem, you just need to change in the build options to compile with nvcc (you create that option following the tutorial indications).

regards.

cristobal