0

I've installed Cuda 5.0 (Preproduction Release) on my iMac which has an NVIDIA GeForce 9400 Cuda-enabled GPU. Using the bundled Eclipse Nsight, I created a project and built it successfully. But, when I try to run it, Eclipse shows me this error message:

dyld: Library not loaded: @rpath/libcudart.dylib Referenced from: /Users/home/cuda-workspace/sample_project/Release/sample_project
Reason: image not found

Any help?

talonmies
  • 70,661
  • 34
  • 192
  • 269
Abdullah
  • 1
  • 2
  • The production release of CUDA 5.0 has been available for a while now. I would uninstall and try again with the production release. – Roger Dahl Dec 09 '12 at 18:46
  • In the getting started guide it says: – Abdullah Dec 09 '12 at 20:37
  • 1
    Define the environment variables. The PATH variable needs to include /Developer/NVIDIA/CUDA-5.0/bin. DYLD_LIBRARY_PATH needs to contain /Developer/NVIDIA/CUDA-5.0/lib. The typical way to place these values in your environment is with the following commands: export PATH=/Developer/NVIDIA/CUDA-5.0/bin:$PATH export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-5.0/lib:$DYLD_LIBRARY_PATH To make these settings permanent, place them in ~/.bash_profile. – Abdullah Dec 09 '12 at 20:37
  • Please bear with me, I'm a newbie, and I'm not sure how to set these variables permanently .. – Abdullah Dec 09 '12 at 20:39
  • It depends on which shell you're using. If you're using bash, add the settings in your ~/.bashrc file. I usually add such settings close to the top, just after the line that checks for an interactive session. – Roger Dahl Dec 09 '12 at 23:25

1 Answers1

1
  1. Please use the production release of the CUDA SDK.
  2. Note that Nsight should be ran from the shell, it does not work when double-clicking the application bundle from the finder.

This is the shell script that starts Nsight in 5.0 production release:

#!/bin/sh
PATH=$PATH:/usr/local/cuda-5.0/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64 UBUNTU_MENUPROXY=0 LIBOVERLAY_SCROLLBAR=0 /usr/local/cuda-5.0/libnsight/nsight $@
Eugene
  • 9,242
  • 2
  • 30
  • 29