Bonjour,
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” {
#endif
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