(I use Ubuntu 10, not Fedora.) Have you added the library installation folder (normally /usr/local/cuda/lib) to LD_LIBRARY_PATH? You also have to run ldconf after that to set up sonames.
But if you do an ls -l on that directory, you’ll see that there are no libcuda.so* files, so no matter what you do, -lcuda won’t be found. (True for CUDA 4.0 on my system, anyway.)
Then it might be in /usr/local/cuda/lib64. It should be somewhere. I successfully link to it myself. Check the library installation paths in /usr/local/cuda/bin/nvcc.profile, maybe it’s in one of those.
libcuda.so is installed by the driver ( in /usr/lib or /usr/lib64 depending on your OS), libcudart.so is in the toolkit.
If you are using the driver API, you need to link to libcuda, if you are using the runtime API you need to link to libcudart.
Thanks for clearing this up. It makes a sort of sense, especially since I do a lot of work on my laptop, which does not have a CUDA device installed. The desktop machine which has the GPUs does have a libcuda in /usr/lib64, but my executables are always linked with -lcudart, since that works on either system. (And in fact my CUDA development directories on the desktop machine are just the notebook ones mounted via NFS.)
If you cared to expand on the differences between driver & runtime API (or point to some existing docs), I’d be interested.
Thanks for clearing this up. It makes a sort of sense, especially since I do a lot of work on my laptop, which does not have a CUDA device installed. The desktop machine which has the GPUs does have a libcuda in /usr/lib64, but my executables are always linked with -lcudart, since that works on either system. (And in fact my CUDA development directories on the desktop machine are just the notebook ones mounted via NFS.)
If you cared to expand on the differences between driver & runtime API (or point to some existing docs), I’d be interested.