Hi, I want to use
cutCreateTimer(&timer),cutStartTimer(timer),cutStopTimer(timer) …and so on
to test the running time,but I got these:
/tmp/tmpxft_0000101d_00000000-12_addSquare2.o: In function main': tmpxft_0000101d_00000000-11_addSquare2.ii:(.text+0xdef8): undefined reference to
cutCreateTimer’
tmpxft_0000101d_00000000-11_addSquare2.ii:(.text+0xdf1b): undefined reference to cutStartTimer' tmpxft_0000101d_00000000-11_addSquare2.ii:(.text+0xe049): undefined reference to
cutStopTimer’
tmpxft_0000101d_00000000-11_addSquare2.ii:(.text+0xe06c): undefined reference to cutGetTimerValue' tmpxft_0000101d_00000000-11_addSquare2.ii:(.text+0xe087): undefined reference to
cutDeleteTimer’
collect2: ld return 1
it seems to be a problem with “cutil.h,” actually I have compiled as below (with some includes and libs):
[root@localhost mycuda]# nvcc -o addSquare2 addSquare2.cu -I /root/NVIDIA_CUDA_SDK/common/inc/ -L /root/NVIDIA_CUDA_SDK/lib/
and already done
#include <cutil.h>
#include <cutil_inline.h>
What should I do?