0

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

and

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

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

Sorry for my english :D

sim186
  • 39
  • 3
  • 10
  • If it is a C++ library, you will not be able to use it with C. They are different languages. – Aaron Cronin Jul 31 '13 at 11:41
  • Your question is not very clear to me. Have you taken a look at the following posts: [CUDA cutil.h where is it?](http://stackoverflow.com/questions/13024453/cuda-cutil-h-where-is-it), [CUDA 5.0: Replacement for cutil.h?](http://stackoverflow.com/questions/13284961/cuda-5-0-replacement-for-cutil-h), and [Dependencies on cutil when using CUDA 5.0](http://stackoverflow.com/questions/17670278/dependencies-on-cutil-when-using-cuda-5-0)? – Vitality Jul 31 '13 at 11:50

1 Answers1

1

My suggestion:

  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 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.

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257