Hello,
You can't use language reserved keywords as you mentioned correctly.
However, there is a workaround for this using preprocessor macros, but due to compiler variety and complexity I can only offer limited support on this.
You'd have to do the following steps:
1. Ensure C linkage for all C SDK included headers:
extern "C"
{
#include "targetheader.h"
}
2. For cases in which variable names include C++ keywords redefine them within the C linkage scope. (it's still including the header in global scope as expected)
extern "C"
{
// redefine namespace to another identifier for C linkage. Used namespace_ignore as a sample
#define namespace namespace_ignore
// include your headers here
#include "targetheader.h"
// remove redefinition of namespace to continue in C++
#undef namespace
}
Using this method you should be able to properly compile your project, the C SDK is not using a keyword as a identifier for a type, which makes this workaround viable. You're also still able to use the namespace keyword in your C++ code.
Let me know if you have any questions.
Regards,
Pascal