Error on cutCreateTimer, cutStartTimer, cutStopTimer problem on Kubuntu 8.04 these functions retrun

Hi everyone

I m a new CUDA linux programmer and i have just passed here. My problem is CUDA time measurement functions : cutCreateTimer, cutStartTimer, cutStopTimer and cutGetTimerValue returns error on compile. I think it cannot find cutil.lib
When i compile code with :

nvcc kernel.cu -I /home/neo/NVIDIA_CUDA_SDK/common/inc/ -L /home/neo/NVIDIA_CUDA_SDK/common/lib/ -L /home/neo/NVIDIA_CUDA_SDK/lib/ -o array

The Error ouput is :

tmpxft_0000194c_00000000-10_kernel.ii:(.text+0x9d81): undefined reference to cutCreateTimer' tmpxft_0000194c_00000000-10_kernel.ii:(.text+0x9d8c): undefined reference to cutStartTimer’
tmpxft_0000194c_00000000-10_kernel.ii:(.text+0x9e13): undefined reference to cutStopTimer' tmpxft_0000194c_00000000-10_kernel.ii:(.text+0x9e1e): undefined reference to cutGetTimerValue’

Can anyone help ??

Hi everyone

Although nobody answered, i solved it myself. i just forget to add libcutil library file to compile command :

nvcc kernel.cu -l cutil -I /home/neo/cuda_sdk/common/inc -L /home/neo/cuda_sdk/lib -o array

has worked. I want to share my solution to prevent newbies from this easy error

Hi, thanks for your answer, but what does

-l cutil

mean. Is that a low-case ‘L’ after - ? It seems there is no directory for cutil…

Hi, thanks for your answer, but what does

-l cutil

mean. Is that a low-case ‘L’ after - ? It seems there is no directory for cutil…

I use the almost the same same compile command

I got the error like

/usr/bin/ld: cannot find -lcutil

collect2: ld returned 1 exit status

Anybody knows how to deal with it?

I use the almost the same same compile command

I got the error like

/usr/bin/ld: cannot find -lcutil

collect2: ld returned 1 exit status

Anybody knows how to deal with it?