Linking problem with nvcc?

I am compiling various files using something on the lines of:

nvcc file.cu -c -o file.o

then I link them using:

nvcc *.o -o a.out

and I get that a whole pile of functions I have already defined are supposedly undefined. What’s going on here?

EDIT: Admin, please remove. I have moved this question to the development forum. Sorry.