I’m having a little problem which is really frustrating me. My installation of CUDA all goes to plan. The examples work great. deviceQuery runs fine, as does bandwidthTest. However when I try to run a program I have written it gives me the error:
dyld: Library not loaded: @rpath/libcudart.dylib
Referenced from : /blah/blah
Reason: image not found
All my path variables are set up correctly. I have checked. I am compiling simply by nvcc blah.cu -o blah
The same code works on my other machine without problems. What could the problem be here?
Also for big projects mixing c/c++ and cuda I build using the common.mk that the CUDA sdk provides. It is a very nice engine and you can customize it with new flags. It is a great way for building your code. I am surprised that people are not using it as a reference as it is or build from it a new common file.
Stop messing with scripts and “export” commands. Just tell the binary where to look, with install_name_tool. I do, and my CUDA programs (full application bundles) are double-clickable, with no script editing needed (for running it, that is - building is another matter).
Is there an install_name_tool or similar for Linux?