Hi all,
I’m having a weird error when compiling my C++ program. I previously needed cuRAND and was compiling the program as follows:
pgcpp ... -L/usr/local/cuda-6.5/lib64/ -lcurand ...
I removed any use of cuRAND from my program, and therefore removed the -L/usr/local/cuda-6.5/lib64/ -lcurand from the compilation command above. However, I now get:
main.o: In function `main__FPCdN51dN27iiiiPdPdPdPfPiPdPd':
/.../main.cpp:35: undefined reference to `clock_gettime'
I suspect a linking problem but don’t understand how clock_gettime has any relation to the cuRAND library. If I leave -L/usr/local/cuda-6.5/lib64/ -lcuRAND, the program compiles and run fines (even without any actual use of cuRAND).
Why am I getting this error?