nvcc and Netbeans two of a kind, working on a full house

I have been trying to set up Netbeans 6.5 IDE for CUDA development and have had limited success. I was able to get the deviceQuery program to compile and run, so now I am trying the transpose program and running into trouble. I keep getting this error…

[codebox]Running “/usr/bin/make -f Makefile CONF=Debug clean” in /home/dwnj/NetBeansProjects/cudabeansSIMPLE

Clean successful. Exit value 0.

Running “/usr/bin/make -f Makefile CONF=Debug” in /home/dwnj/NetBeansProjects/cudabeansSIMPLE

make: *** No rule to make target obj/release/transpose_gold.cpp.o', needed by …/…/bin/linux/release/transpose’. Stop.

Build failed. Exit value 2.[/codebox]

I simply copied the makefile from the projects directory into the Netbeans makefile. I thought this would tell Netbeans how to make transpose_gold.

[codebox]EXECUTABLE := transpose

Cuda source files (compiled with cudacc)

CUFILES := transpose.cu

C/C++ source files (compiled with gcc / c++)


transpose_gold.cpp \


Also, when setting up “Build Tools”, should the “Make Command” be left as “/usr/bin/make”?


I think your problem is caused because the Makefile supplied in the SDK depends on relative paths. These are correctly set within the SDK tree but not when you copy it to an other folder. Try playing with it. If I remember well my solution was to create a Makefile from scratch containing the commands that I needed to build my examples.

Nvcc works well in NetBeans (though, however, it rejects dependency generation options). To use it, add a new GNU compiler family, with both C and C++ compiler set to nvcc, and switch to it in project preferences. Then add the extension “cu” as a new C++ file extension, somewhere in Netbeans options. When formatting, such a macro

#define kernel(x,y) <<<x,y>>>

prevents NetBeans from breaking the Nvidia operator.