Hello all,
I’m a relative newbie at GPGPU program, and have managed to compile the simple examples.
I want to use the cutil.h functions to time the performance difference between a regular C function and the CUDA version I’ve developed, using the cuda timer functions (cutStartTimer, cutResetTimer etc).
However, simply including the cutil.h header file in a .C file produces many errors when I want to compile, such as,
C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc\cutil.h(122) : error C2143: syntax error : missing ‘{’ before ‘__stdcall’
C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc\cutil.h(124) : error C2146: syntax error : missing ‘)’ before identifier ‘verbose’
C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc\cutil.h(124) : error C2081: ‘bool’ : name in formal parameter list illegal
C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\common\inc\cutil.h(124) : error C2061: syntax error : identifier ‘verbose’
Other files such as cuda.h and cuda_runtime.h produce similar syntax errors.
What am I missing, in my project file/environment? I’ve tried switching compilers between Compile as C Code, Compile As C++ and using the CUDA tool and that doesn’t work.
I’m using Visual Studio Express 2005 and can compile (and run in EMU mode) the SDK examples without a problem.
Sorry if it’s a bit vague. Thank you.