I am trying to compile a CUDA boxFilter example from the command line to get a good grasp on CUDA compilation.
From the command line here is what I typed:
nvcc -I /Desktop/CUDA/NVIDIA_CUDA_SDK_MACOSX/common/inc -c *.cu
That gave me the following obj files:
boxFilter.o and boxFilter_kernel.o so far so good…
Then I had to compile the boxFilter_gold.cpp file (whats with all the examples having “gold” in the name anyway. Is that significant?)
nvcc -c boxFilter_gold.cpp
That compiles and gives me: boxFilter_gold.o
Now when I try to link them with the command: nvcc *.o I get an error…
ld: duplicate symbol ___device_stub__Z17d_boxfilter_y_texPfiii in boxFilter_kernel.o and boxFilter.o
Am I missing a step or a library?
Thanks for having a look.