cudart not found

I’ve installed cuda 1.1 on a linux box (ubuntu 8.04) and can compile and run the included sample project no problem.
Unfortunately, if I try something like “nvcc myproject.cu” it errors (/usr/bin/ld: cannot find -lcudart).
I’ve searched around but haven’t found anything yet…any help is appreciated, thanks!

I figured it out:
nvcc -L/usr/local/cuda/lib -lcudart myfile.cu
so assign alias nvcc=“nvcc -L/usr/local/cuda/lib -lcudart” and it works great.

On Ubuntu, you can add the file “cuda.conf” to the directory “/etc/ld.so.conf.d/”, with the contents

Then you run “sudo ldconfig”.

This is the “proper” way of doing the same thing - essentially adding the CUDA lib directory to LD_LIBRARY_PATH. There are some threads about this I think.

Note that LD_LIBRARY_PATH requirement is described in the post-installation instructions displayed after you install the Toolkit. It’s very easy to miss this information – here’s a tip: read CUDA installer printouts CAREFULLY :)