最近在搞GPU编程时,使用vs2015编译cuda程序 但是却出现如下的错误

GPU编程_The CUDA Toolkit v8.0 directory '' does not exist.

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 8.0.targets(514,9): error : The CUDA Toolkit v8.0 directory '' does not exist.  Please verify the CUDA Toolkit is installed properly or define the CudaToolkitDir property to resolve this error.
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

我所使用的是  编译的文件为 vs2015创建cuda项目所自带的文件 kernel.cu,同时代码中也有错误,解决方案是:

环境:

      windows 7

      VS2015

      cuda 8..0

1,调试>"项目"属性

GPU编程_The CUDA Toolkit v8.0 directory '' does not exist.


2,CUDA C/C++ 然后设置 CUDA Toolkit Custom Dir 的路径为 你的cuda安装路径

GPU编程_The CUDA Toolkit v8.0 directory '' does not exist.

3,设置之后错误也没了,重新编译运行  就正常了

GPU编程_The CUDA Toolkit v8.0 directory '' does not exist.


相关文章:

  • 2021-06-13
  • 2021-08-13
  • 2021-11-18
  • 2022-12-23
  • 2021-08-19
  • 2021-11-25
  • 2021-08-26
  • 2021-10-09
猜你喜欢
  • 2021-10-20
  • 2021-05-11
  • 2021-12-17
  • 2021-06-04
  • 2021-08-02
  • 2021-09-13
相关资源
相似解决方案