Im trying to integrate a CUDA module (.c code which I modified for GPU processing into a .cu code) back in its original source code, but the CPU functions written in that module are not being linked. I’m getting an “Undefined reference” error for the functions written in the .cu file which are being called from other functions.
I’m compiling the source using the template makefile available with the examples. The examples are being compiled properly and a personal-test-standalone .cu file compiled in this manner also gave a working executable.
I have tried generating an object file through nvcc and linking it to the source which also proved futile giving the same error. In both cases if the symbols in the object file are listed using nm, the function names which are giving the error are missing, rather they have a certain prefix and suffix of some sort due to which the linking is not happening.
Any suggestions on the right procedure I’ve to follow to solve my problem?
Thanks in advance