我在 .cpp
文件中包含 <cuda_runtime.h>
时遇到了问题。错误信息: Cannot include file: cuda_runtime.h: No such file or directory
。
我正在尝试编译 Rob Farber 的代码(http://www.drdobbs.com/architecture-and-design/222600097?pgno=1)。
之前我已经编译过几个 cuda 代码,但是 <cuda_runtime.h>
总是在 .cu
文件中被包含。
我使用的是 VS 2008 Express。
问:我需要以某种不同的方式链接 VS,以便它知道在哪里查找 <cuda_runtime.h>
吗?
VC++ 目录
中,添加 CUDA 工具包包含目录。您还可以为 CUDA 指定库和运行时目录。 - geek