cutil.h cannot be used with a C compiler ?

On simple question…
I use CUDA with a C compiler (NOT a C++ compiler)
Some of my testing projects are already working fine

In my last test project I need to include cutil.h
However I’m facing various problems at compile time

Indeed some of the functions prototypes have default values (see below one example of such function)
cutReadFilef( const char* filename, float** data, unsigned int* len, bool verbose = false);

For me this smell C++…

Just to make sure, I looked at the top of the header file and I saw the following lines
#ifdef __cplusplus
extern “C” {

In addition, at the very end of the header file I see the following lines
#ifdef __cplusplus
#endif // #ifdef _DEBUG (else branch)

Just to make sure I checked the content of the header file and __cplusplus occurs only two times (top and bottom of the file)

For me this means cutil.h was designed such a way it can be used with a regular C compiler but only effectively tested with C++ compilers…

One additional comment.
For what I know, the “bool” datatype is NOT a regular native datatype except for C++ compilers.
For me this confirm the point above : cutil.h can only be used with a C++ compiler.

So my questions are :
1 - Can someone confirms cutil.h works fine with a regular C compiler
2 - Can someone tells me if a specific version of cutil.h exist for C compiler
3 - Can someone tells me if there are plans to make sure cutil.h will be modified such a way it will work with C compilers.

Best regards, Philippe

Cutil is written for C++, just like the rest of the SDK (in fact to use CUDA you must use a host C++ compiler, but you have the option of compiling host C code). But Cutil isn’t intended for use in anything other than SDK sample programs. It isn’t supposed to be used in your own code. It is undocumented, likely to change from version to version, and not tested for any purpose other than use inside the SDK. The NVIDIA developers who post here warn against using it.

You would be better off using something else.