cutil.h not found

I get this error in trying to compile with Visual Studio 2005.
1> : fatal error C1083: Cannot open include file: ‘cutil.h’: No such file or directory

I have included this in project properties->Configuration Properties->C/C+±>General->Additional Include Directories
C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc

I have the same problem with you. I don’t know the reason either.
and I have set the enviornment variables, but it doesn’t work.

try to copy and past this string to

project properties->Configuration Properties->C/C+±>General->Additional Include Directories

$(CUDA_INC_PATH);./;…/…/common/inc;“C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc”


#include <cutil.h>

in the *.cu file

goodluck :D

to set the enviornment variables is not suitable for this problem.

$(CUDA_INC_PATH);./;…/…/common/inc;“C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc” here …/…/common/inc == “C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc”

put the “C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc” into the enviornment variables. create a CUDA_COMMON_INC and use it like (CUDA_INC_PATH), (CUDA_COMMON_INC)

I am including cutil.h. Otherwise, the compiler would not say it could not find it. I already have $(CUDA_INC_PATH) in the additional include directories. I tried
C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/inc with the slashes in the right direction and saw no difference.

Problem Solved.

I used environment variables in place of …/…/common/inc in the command arguments for nvcc in the custom build line. That fixed the problem, but I had to restart Vista before Visual Studio would see the new environment variables for some reason.

getting error Cannot open include file: ‘cutil.h’ on my windows7 machine. having cuda toolkit version 8.0 and visual studio 2012. the above solution is not working please help to solve this problem.

You’re likely running some very legacy code that copied the declaration from old SDK samples (even though those samples say not to.) But you can still dig up the old cutil.h if you need it.

See this answer.