The*_*EEP 4 c++ gcc namespaces ffmpeg ogre
我正在编译一个同时使用ffmpeg和Ogre的项目.现在在Windows上,一切正常.
但是,当我想用以下代码行编译文件时:
Ogre::PixelFormat format = Ogre::PF_BYTE_RGBA;
Run Code Online (Sandbox Code Playgroud)
编译器给出以下错误:
error: ‘AVPixelFormat’ is not a member of ‘Ogre’
Run Code Online (Sandbox Code Playgroud)
这在很多方面都很奇怪,因为我不仅使用::指定了Ogre命名空间,而且Ogre中也没有AVPixelFormat.gcc如何将"PixelFormat"与"AVPixelFormat"混为一谈?
我怎么能摆脱它呢?
我喜欢在这里使用int而不是枚举,但另一个Ogre函数需要格式在Ogre :: PixelFormat中.
首先使用它进行预处理gcc -E,然后grep通过文件查找AVPixelFormat或PixelFormat.我怀疑你有#define或typedef浮动,你只需要找到这种情况发生的地方,并且预编译的源文件就会变得明显.