linker cannot find -lcuda

Hallo,
I was using cuda 5.0 toolkit successfully till I have unfortunately rewritten .bashrc in my home directory (ubuntu 12.04). After I realized what happened, I set up the environmental variables as is written in the CUDA getting started guide. But unfortunately, I am unable to compile CUDA samples. The compiler returns the following error:

g++ -m64 -o simpleTextureDrv simpleTextureDrv.o -L/usr/local/cuda-5.0/lib64 -lcuda 
/usr/bin/ld: cannot find -lcuda

I have tried to reinstall the toolkit, but the problem remained.

Can anyone, please, help me?

Thanks in advance,

Dalibor

After some googling I have found a solution:

http://stackoverflow.com/questions/2716293/trying-to-make-cuda-sdk-ld-cannot-find-library-ldconfig-says-it-can

  • particulary

export PATH=/usr/local/cuda/bin:$PATH
export LPATH=/usr/lib/nvidia-current:$LPATH
export LIBRARY_PATH=/usr/lib/nvidia-current:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:$LD_LIBRARY_PATH

  • which exceeds the path redefinitions located in CUDA getting started guide

Regards,

Dalibor