2011-11-08 24 views
2

我正在使用Visual Studio 2010,並且希望在C:\ ProgramData \ NVIDIA Corporation \ NVIDIA 4.0 GPU Computing Toolkit \ C \ src下創建示例。如何使用Visual Studio構建CUDA 4.0示例?

我對包含文件有很多問題,但部分解決方法是使用Visual Studio在C:\ ProgramData \ NVIDIA Corporation \ NVIDIA GPU Computing SDK 4.0 \ C \ common下構建cutil項目。

但是,當我嘗試編譯nbody的例子,我得到一個錯誤消息,這意味着與以前安裝的3.2 GPU計算工具包的衝突。

我該如何解決這個「退出-1」的錯誤?

C:\ Program Files文件 (86)\的MSBuild \ Microsoft.Cpp \ V4.0 \ BuildCustomizations \ CUDA 4.0.targets(357,9):錯誤MSB3721:該命令 「」 C:\程序Files \ NVIDIA GPU Computing Toolkit \ CUDA \ v3.2 \ bin \ nvcc.exe「 -gencode = arch = compute_10,code = \」sm_10,compute_10 \「-gencode = arch = compute_20,code = \」sm_20,compute_20 \「--use-local-env --cl-version 2010 -ccbin」c:\ Program Files(x86)\ Microsoft Visual Studio 10.0 \ VC \ bin「-I」./「-I」../ ../common/inc「 -I」../../../ shared/inc「-I」C:\ Program Files \ NVIDIA GPU計算工具包\ CUDA \ v3.2 \ include「-G0 --keep- dir「Debug」-maxrregcount = 0 --machine 32 --compile -D_NEXUS_DEBUG -g -Xcompiler「/ EHsc/nologo/Od/Zi/MTd」-o「Win32/Debug/bodysy stemcuda.cu.obj「 」C:\ ProgramData \ NVIDIA Corporation \ NVIDIA GPU Computing SDK 4.0 \ C \ src \ nbody \ bodysystemcuda.cu「」用代碼-1退出。

回答

1

您似乎在路徑中包含3.2 include目錄而不是4.0 CUDA_INC_PATH設置爲什麼?

+0

我不知道它有這樣一個簡單的解決方案。謝謝! –

相關問題