compile error on ubuntu 10.10

Hi,
I’m new to cuda, I have installed cuda toolkit and SDK on my unbuntu 10.10, when I try to compile “template” in **_SDK/C/src/, I typed:
sudo make dbg=1
and it returns:
/usr/bin/ld:cannot find -lcutil_x86_64D
/usr/bin/ld: cannot find -lshrutil_x86_64D
collect2: ld returned 1 exit status
make: *** {…/…/bin/linux/debug/template] Error 1

Anyone can help me out? thanks

First of all… DO NOT USE SUDO!!! You don’t need root privilidges to compile the SDK examples provided your user own’s the directories that the SDK is in.

running the following tells you a little more (on my system the output is slightly different)…

make dbg=1 verbose=1

g++ -fPIC -o ../../bin/linux/debug/template obj/debug/template_gold.cpp.o  obj/debug/template.cu.o     -L/usr/local/cuda/lib64 -L../../lib -L../../common/lib/linux  -lcudart     -L/usr/local/cuda/lib64 -L../../lib -L../../common/lib/linux  -lcutilD

/usr/bin/ld: cannot find -lcutilD

collect2: ld returned 1 exit status

make: *** [../../bin/linux/debug/template] Error 1

The problem is that g++ is being told to link to library cutilD which doesn’t exist on your system. You need to build the debugging version of the cutil library by doing…

#in root SDK directory

cd C/common/

make dbg=1 verbose=1

You will now notice in C/lib/ there will be a file called libcutilD.a

I’m not sure what the library “shrutil_x86_64D” is. You’ll have to find it and build it.

Hopefully this’ll get you started.

Thank you, delcypher!

I find the error associates with cutil is gone after building that library. And also, shrutil I guess is another library in **SDK/shared one has to build.