2
我想使用cuda工具包,我已經從here下載了最新的7.5 - 安裝。然後到Developer/NVIDIA/CUDA-7.5/samples並嘗試構建任何樣本,但是獲取任何STL標頭的錯誤。我試圖用make或nvcc來構建它。這裏是我想要做的事:CUDA 7.5 + OSX 10.10.5優勝美地致命錯誤:'string.h'或任何其他STL標頭
cd /Developer/NVIDIA/CUDA-7.5/samples/0_Simple/clock && make
這裏是輸出:
/Developer/NVIDIA/CUDA-7.5/bin/nvcc -ccbin clang++ -I../../common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o clock.o -c clock.cu
In file included from <built-in>:174:
In file included from <command line>:9:
In file included from /Developer/NVIDIA/CUDA-7.5/bin/../include/cuda_runtime.h:112:
/Developer/NVIDIA/CUDA-7.5/bin/../include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
^
1 error generated.
make: *** [clock.o] Error 1
,這裏是什麼它顯示當我運行nvcc --verbose clock.cu
#$ _SPACE_=
#$ _CUDART_=cudart
#$ _HERE_=/Developer/NVIDIA/CUDA-7.5/bin
#$ _THERE_=/Developer/NVIDIA/CUDA-7.5/bin
#$ _TARGET_SIZE_=
#$ _TARGET_DIR_=
#$ _TARGET_SIZE_=64
#$ TOP=/Developer/NVIDIA/CUDA-7.5/bin/..
#$ NVVMIR_LIBRARY_DIR=/Developer/NVIDIA/CUDA-7.5/bin/../nvvm/libdevice
#$ PATH=/Developer/NVIDIA/CUDA-7.5/bin/../open64/bin:/Developer/NVIDIA/CUDA-7.5/bin/../nvvm/bin:/Developer/NVIDIA/CUDA-7.5/bin:/Developer/NVIDIA/CUDA-7.5/bin:/Developer/NVIDIA/CUDA-7.0/bin:/Developer/NVIDIA/CUDA-7.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin
#$ INCLUDES="-I/Developer/NVIDIA/CUDA-7.5/bin/../include"
#$ LIBRARIES= "-L/Developer/NVIDIA/CUDA-7.5/bin/../lib"
#$ CUDAFE_FLAGS=
#$ PTXAS_FLAGS=
#$ clang -D__CUDA_ARCH__=200 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__ "-I/Developer/NVIDIA/CUDA-7.5/bin/../include" -D"__CUDACC_VER__=70513" -D"__CUDACC_VER_BUILD__=13" -D"__CUDACC_VER_MINOR__=5" -D"__CUDACC_VER_MAJOR__=7" -include "cuda_runtime.h" -m64 "clock.cu" > "/var/folders/gy/dzj7qpvd2t90c8c8x1lqd7gw0000gn/T//tmpxft_0000a22e_00000000-9_clock.cpp1.ii"
In file included from <built-in>:174:
In file included from <command line>:9:
In file included from /Developer/NVIDIA/CUDA-7.5/bin/../include/cuda_runtime.h:112:
/Developer/NVIDIA/CUDA-7.5/bin/../include/common_functions.h:65:10: fatal error: 'string.h' file not found
#include <string.h>
^
1 error generated.
# --error 0x1 --
任何人都有類似的事情或許有一些想法如何解決這一問題?
p.s.最初想用gnu支持構建opencv3,但得到了同樣的錯誤,然後去檢查樣本是否工作。
您是否安裝了XCode 6? – talonmies
是的,我有6.4 – AlexeyIS
包括命令行工具? (我記得他們有必要得到頭) – talonmies