CUDA C - 从cutil.h到helper_cuda.h的库错误

时间:2013-07-31 11:40:16

标签: c++ c cuda

我在CUDA 4.0上开发了一个用C开发的项目。现在我尝试在CUDA 5.0上编译它,但我有一些cutil.h的问题,我已经将cutil更改为helper_cuda.h并且我总是收到此错误:

In file included from /path/to/helper_cuda.h:24

/path/to/helper_string.h:18: fatal error: fstream: No such file or directory

fstream是一个C ++库,如何在没有此错误的情况下编译它?

对不起我的英文:D

1 个答案:

答案 0 :(得分:1)

我的建议:

  1. 在CUDA 5.0安装程序上加载CUDA 4.0 SDK
  2. 使用CUDA 5工具包(nvcc等)构建CUDA 4.0 SDK
  3. 现在包含相同的头文件,并链接到与CUDA 4.0 SDK中的cutil排列相对应的相同库(您刚刚构建的)。
  4. 正如您所发现的那样,

    helper_cuda.h不是cutil.h的替代品。很可能,如果您解决了这个fstream问题,您可能会遇到另一个问题,具体取决于您实际使用的cutil项目中的组件。