CUDA C - 从cutil.h到helper_cuda.​​h库错误 [英] CUDA C - library error from cutil.h to helper_cuda.h

查看:616
本文介绍了CUDA C - 从cutil.h到helper_cuda.​​h库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C语言开发,对CUDA 4.0的项目。现在,我尝试编译它CUDA 5.0,但我有一些问题,cutil.h,我已经改变cutil到helper_cuda.​​h,我总是收到此错误:

I have a project developed in C, on CUDA 4.0. Now i try to compile it on CUDA 5.0 but i have some problem with cutil.h, i have changed cutil to helper_cuda.h and i receive this error always:

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 ++库,我怎么可以编译这个有没有这个错误?

fstream is a C++ library, how i can compile this without have this error?

对不起,我的英语:D

Sorry for my english :D

推荐答案

我的建议是:


  1. 加载您CUDA 5.0安装程序的CUDA 4.0 SDK

  2. 使用CUDA工具包5生成CUDA 4.0 SDK(NVCC等)

  3. 现在,包括相同的头文件和链接对同一库(你刚建)对应于从CUDA 4.0 SDK中的 cutil 安排。

  1. Load the CUDA 4.0 SDK on your CUDA 5.0 setup
  2. Build the CUDA 4.0 SDK using the CUDA 5 toolkit (nvcc, etc.)
  3. Now include the same header files and link against the same libraries (that you just built) that correspond to the cutil arrangement from the CUDA 4.0 SDK.

helper_cuda.​​h 是不是一个简易替换为 cutil.h 你正在发现。很可能,如果你的工作过去,这的fstream 的问题,你可能会遇到一个又一个,这取决于哪些组件出的 cutil 项目是否正在使用。

helper_cuda.h is not a drop-in replacement for cutil.h as you are discovering. Very likely, if you worked past this fstream issue, you might run into another one, depending on what components out of the cutil project you are actually using.

这篇关于CUDA C - 从cutil.h到helper_cuda.​​h库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆