when I unchecked Enable Make Dependency Checking in NetBeans IDE (see this issue) now IDE uses nvcc and compiles my .cu to .o but it doesn't do linking at all:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf make1: Entering directory
/me/NetBeansProjects/my_CUDA_1' "/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/libmy_cuda_1.a make[2]: Entering directory
/me/NetBeansProjects/my_CUDA_1' mkdir -p build/Debug/GNU-Linux-x86 /usr/local/cuda-5.0/bin/nvcc -c -g -I/usr/local/cuda-5.0/include -I/usr/local/cuda-5.0/samples/common/inc -o build/Debug/GNU-Linux-x86/cudaMain.o cudaMain.cu mkdir -p dist/Debug/GNU-Linux-x86 rm -f dist/Debug/GNU-Linux-x86/libmy_cuda_1.a ar -rv dist/Debug/GNU-Linux-x86/libmy_cuda_1.a build/Debug/GNU-Linux-x86/cudaMain.o ar: creating dist/Debug/GNU-Linux-x86/libmy_cuda_1.a a - build/Debug/GNU-Linux-x86/cudaMain.o ranlib dist/Debug/GNU-Linux-x86/libmy_cuda_1.a make[2]: Leaving directory/me/NetBeansProjects/my_CUDA_1' make[1]: Leaving directory
/me/NetBeansProjects/my_CUDA_1'BUILD SUCCESSFUL (total time: 2s)
I can link from terminal:
comp@comp:# ls
cudaMain.ocomp@comp:# g++ -m64 -o cudaMain cudaMain.o -L/usr/local/cuda-5.0/lib64 -lcudart comp@comp:#./cudaMain comp@comp:/me/NetBeansProjects/my_CUDA_1/build/Debug/GNU-Linux-x86#
I think this is something related to the fact that it doesn't check make dependency (?) what to check/uncheck/delete/add/change in IDE to enable linking? I don't know why but there is no options related to linking in Projects->Properties.
EDIT:
at this moment I resolved ALL issues to install (with Soroosh help, thanks again) CUDA-5.0 on Ubuntu 12.10 (and use "NVIDIA binary Xorg driver, kernel module and VDPAU library from nvidia-current" driver - only this gives me extra graphics/resolution) and compile with Netbeans ALL samples projects and to compile and run my own. if anyone has any problems, please ask
nsight
or/usr/local/cuda/bin/nsight
– Soroosh Bateni