I’m getting “undefined reference to ‘cuInit’” when i try to link my code. I need to run cuInit to initialize the card, ofcourse, and i have #include “cuda.h” in the .cu file, but it still can’t find it. What am I missing?
nvcc *.o -o main
gpu_code.o in function ‘init’:
…: undefined reference to ‘cuInit’
collect2: ld returned 1 exit status
When i remove cuInit(0); from my code it links fine, but ofcourse it doesn’t work. So all I need is to get this one function call to work.