Strange enum name clash
c++, ffmpeg, gcc, namespaces, ogre
Solution
Preprocess it first using `gcc -E`, then `grep` through the file looking for `AVPixelFormat` or `PixelFormat`. I suspect you have a #define or a `typedef` floating around, you just need to find where this happens, and a precompiled source file is the place this will become apparent.
Problem
I am compiling a project that uses both ffmpeg and Ogre. Now on Windows, everything works fine. But when I want to compile a file with the following line of code: ``` Ogre::PixelFormat format = Ogre::PF_BYTE_RGBA; ``` The compiler gives the following error: ``` error: ‘AVPixelFormat’ is not a member of ‘Ogre’ ``` Which is strange in many ways, as I have not only specified the Ogre namespace with ::, but also there is no AVPixelFormat in Ogre. How does gcc confuse "PixelFormat" with "AVPixelFormat"? And how can I get rid of that? I'd love to use int here instead of an enum, but another Ogre function requires format to be in Ogre::PixelFormat.