Hi, I am compiling ffmpeg with xcode, which I assume uses clang to compile. Ffmpeg has a structure with a member variable called "class". I find this to be excellent in C, but clang is trying to parse it as a keyword. Any idea how to fix it? Basically the following in the cpp file will throw an error:extern C {
typedef struct {
int class;
} SomeStruct;
}
He is trying to interpret the class as a keyword.
FYI, the file that throws an error in ffmpeg is libavcodec / mpegvideo.h, and I need to enable this in order to access the MpegEncContext structure in order to pull out the motion map information.
EDIT
The above code example was just to demonstrate the error. But perhaps this fix is different. In my actual code, I have it like this:
#ifdef __cplusplus
extern "C" {
#endif
#include "libavcodec/mpegvideo.h"
#include "libavformat/avformat.h"
#if __cplusplus
}
#endif
, C, ++?