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

CUDA C - library error from cutil.h to helper_cuda.h

本文关键字:CUDA 错误 cutil helper      更新时间:2023-10-16

我有一个在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. 在CUDA 5.0安装程序上加载CUDA 4.0 SDK
  2. 使用CUDA 5工具包(nvcc等)构建CUDA 4.0 SDK
  3. 现在包括相同的头文件和针对相同库的链接(您刚刚构建的),这些库对应于CUDA 4.0 SDK中的cutil排列

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