I've a file A.cu containing function void A(). I've another file test_A.c which calls the cuda function A() and also has function declaration as
extern void A();
Now I compile and link them as follows
nvcc -c -o A.o A.cu
gcc -o test_A test_A.c A.o /opt/cuda-4.0/cuda/lib64/libcudart.so
and I get error like
undefined reference to `A'
What am I missing?