tags:

views:

110

answers:

4

I don't know how to include cutil.h in linux, i know where it is, but I don't know how to include it. Ideas please.

+1  A: 
#include <cutil.h>

find out where cutil.h is:

sudo updatedb; locate cutil.h

nvcc -I /usr/local/cuda/include ...

for you

nvcc -I ~/NVIDIA_GPU_Computing/C/common/inc test.cu -o test
aaa
A: 
#include <cutil.h>
Lie Ryan
A: 

I know

#include <cutil.h>

I need to let compiler know where cutil.h is and compile it first. @aaa carp: can you give some more detail? say my code is test.cu and cutil.h is located at ~/NVIDIA_GPU_Computing/C/common/inc. Thank you.

small_potato
A: 

Make sure your executable script has the following:

-I/usr/local/cuda/include \
-L/usr/local/cuda/lib64 \
-I/$HOME/NVIDIA_GPU_Computing_SDK/C/common/inc/ \
-L/$HOME/NVIDIA_GPU_Computing_SDK/C/lib -lcutil_x86_64 \

Obviously the assumption is that the SDK is in your home directory.

vivekv80