2014-04-29 56 views
1

我下載並安裝了以下軟件包在Mac OS X 10.9:不能在OS X上運行ArrayFire HelloWorld示例10.9

c++ -m64 -Wall -Werror -I../../include -I/usr/local/cuda/include -O3 -DNDEBUG -L../../lib -laf -lafGFX -L/usr/local/cuda/lib -lcuda -lcudart -lcurand -lcusparse -lpthread -lstdc++ -lm -Wl,-rpath,../../lib,-rpath,/opt/arrayfire/lib,-rpath,/usr/local/cuda/lib 

helloworld.cpp -o helloworld

ArrayFire-maci-1.9-20121120.zip

cuda-mac-5.5.28_10.9_64.pkg

成功構建HelloWorld示例我得到以下輸出後

但是試圖運行HelloWorld可執行文件我得到以下錯誤時:

./helloworld 
dyld: Library not loaded: @rpath/libcufft.5.5.dylib 
    Referenced from: /opt/arrayfire/lib/libaf.dylib 
    Reason: Incompatible library version: libaf.dylib requires version 5.5.0 or later, but libcufft.5.5.dylib provides version 0.0.0 
Trace/BPT trap: 5 

但dylib庫的版本根據otool輸出是正確的:

otool -L /usr/local/cuda/lib/libcufft.dylib 
libcufft.dylib:  @rpath/libcufft.5.5.dylib (compatibility version 0.0.0, current version 5.5.28)  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0) 

/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)

是否有人有想法如何解決這個問題?

回答

0

您還需要設置DYLD_LIBRARY_PATH在你的.bash_profile

export DYLD_LIBRARY_PATH=$AF_PATH/lib:$DYLD_LIBRARY_PATH 
export DYLD_LIBRARY_PATH=$CUDA_PATH/lib:$DYLD_LIBRARY_PATH