我試圖make
在Nsight IDE但遺憾的是沒有任何的運氣:CUDA Nsight在OS X上沒有作出
Building file: ../src/Cuda_Test.cu
Invoking: NVCC Compiler
/Developer/NVIDIA/CUDA-5.5/bin/nvcc -O3 -gencode arch=compute_12,code=sm_12 -odir "src" -M -o "src/Cuda_Test.d" "../src/Cuda_Test.cu"
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
make: *** [src/Cuda_Test.o] Error 1
,我可以在以下頁面瞭解:
http://blog.cryptohaze.com/2012/12/nvcc-os-x-clang-and-dumpspecs.html http://lists.freebsd.org/pipermail/freebsd-ports/2011-December/071844.html
看來我正在使用錯誤的C和CPP編譯器,但是如何更改這些參數?解決方法似乎適用於CMake
而不是Make
。
usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix
環境:
echo $PATH
/usr/local/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Developer/NVIDIA/CUDA-5.5/bin
echo $DYLD_LIBRARY_PATH
/Developer/NVIDIA/CUDA-5.5/lib:$DYLD_LIBRARY_PATH
您是否按照mac [入門指南](http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-mac-os-x/index.html)? –
@RobertCrovella,我完全按照那個HOWTO .. – JavaCake
那麼結果是什麼?例如,在第2.5.2節中,您被指示構建示例。那是成功的嗎?在第2.5.3節中,您被指示運行一些二進制文件,是否成功? –