Unfortunately, you are out of luck.
A is a typedef for an unlabeled struct . And you cannot forward the declaration, since you cannot directly refer to this struct .
Can you change the generator to output typedef struct A { ... } A; ? Then it will compile well in both C and C ++, and you can redirect the declaration to C ++.
Otherwise, you have two options: 1. #include file containing a struct declaration. 2. Copy the struct manually. Obviously, (1) is much preferable.
source share