所有的.h文件中的内联函数例如:
static inline int av_cmp_q(AVRational a, AVRational b){
const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
if(tmp) return (tmp>>63)|1;
else return 0;
}
都会出现下面的错误
d:\testmpeg2\sourse\rational.h(46) : error C2054: expected '(' to follow 'inline'
d:\testmpeg2\sourse\rational.h(46) : error C2085: 'av_cmp_q' : not in formal parameter list
d:\testmpeg2\sourse\rational.h(46) : error C2143: syntax error : missing ';' before '{'
解决方法:
不用改代码,直接改project->[setting]->[c/c++]->Preprocessor definitions:编辑框里输入inline=__inline即可。
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。