I modified the file .bash_profile :
add the below lines to .bash_profile:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib
and then in terminal type: #source ~/.bash_profile,
at the "make " step ,no error occured,
but,when execute the examples from SDK, errors occured:cannot find libcudart.so.
It likes that compiler can not find cuda library!
who can help me ?
Thanks !My English is poor ,hope you understand me!
With most modern distribution (works on Debian, Ubuntu and openSUSE), the loading of shared library is controlled in configuration files ( namely “/etc/ld.so.conf” and all conf files in “/etc/ld.so.conf.d”) :[list=1]
[*]Go in directory " /etc/ld.so.conf.d "
[*]As root (for exemple " sudo nano ", or whatever) add a file named " cuda.conf "
[*]Type in the path to the cuda library " /usr/local/cuda/lib ", and save the file
[*]As root run " /sbin/ldconfig " to update
Now, when you run the programs, they will automatically fetch the correct dynamically linked .SO file.
(To see it in action, type "ldd " + the name of the program. LDD will list all the required shared libraries, and which .SO file it has found for them).
…aaargh! i feel dumb! I think i was using x86_64 version of the tool kit on 32bit. uninstalled and re-installed 32 bit toolkit and things work fine. although a different error now. /usr/local/cuda/lib has libcudart.so but no libcuda.so but sample apps like simpleTextureDrv uses the the USEDRVAPI=1 and that tries to use -lcuda instead of -lcudart and then fails.