Are you trying to compile the code including it as C, or C++? That header uses struct inheritance, which means it needs to be compiled as C++.
multiple expected identifier or '(' before ':' token when compiling android_npapi.h file
-
10-03-2022 - |
Frage
As stated above the android_npapi.h provides multiple errors of the above type at this point:
struct ANPInterface {
uint32_t inSize; // size (in bytes) of this struct
};
enum ANPLogTypes {
kError_ANPLogType = 0, // error
kWarning_ANPLogType = 1, // warning
kDebug_ANPLogType = 2 // debug only (informational)
};
typedef int32_t ANPLogType;
struct ANPLogInterfaceV0 : ANPInterface {
/** dumps printf messages to the log file
e.g. interface->log(instance, kWarning_ANPLogType, "value is %d", value);
*/
void (*log)(ANPLogType, const char format[], ...);
};
struct ANPBitmapInterfaceV0 : ANPInterface {
/** Returns true if the specified bitmap format is supported, and if packing
is non-null, sets it to the packing info for that format.
*/
bool (*getPixelPacking)(ANPBitmapFormat, ANPPixelPacking* packing);
};
Starting from the "struct ANPLogInterfaceV0 : ANPInterface" every struct definition containing an inheritance of ANPInterface gives the above error.
For more info on said header file : android_npapi.h
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow