expected '(' to follow 'inline'
来源:互联网 发布:玄武指弹吉他教室知乎 编辑:程序博客网 时间:2024/06/05 07:06
error C2054: expected '(' to follow 'inline'
所有的.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即可。
所有的.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即可。
阅读全文
0 0
- expected '(' to follow 'inline'
- winpcap示例程序采用VC6编译时出错error C2054: expected '(' to follow '_W64'
- Things to follow
- To Understand Washington, Follow the Shrimp
- LINQ to SQL and Disconnected Entities Follow-up
- using strace to follow the startup of zygote
- How to make enemies follow your hero (seeking missiles)
- twiiter 推荐《WTF: The Who to Follow Service at Twitter》
- Simple Tips to follow Before You Quit Job
- 24 Ultimate Data Scientists To Follow in the World Today
- expected class-name before ‘{’ to 错误处理
- Unable to locate tools.jar. Expected to find it in........
- Parameter 2 to mysqli_stmt::bind_param() expected to be a reference
- 5 important things to follow to become good in shell scripting
- How to inline ASM in C (gcc)
- Return to the Basic - 内联函数(inline)
- inline
- inline
- Ubuntu1604下使用virtualenv工具搭建python2,3开发环境
- 微信分享图片 文字 Android原生分享图片文字 微信小程序分享
- 【Java多线程】线程池的工作原理详解(下)
- Arithmetic Slices
- Mybatis数据生成工具类
- expected '(' to follow 'inline'
- Eclipse + Gradle环境配置
- 剑指offer——字符串的排列(好题,扩展题也很好,全排列的算法)
- JAVA设计模式之单例模式
- Spinner
- Git与TortoiseGit基本操作
- 飞机大战(七):删除越界
- linux nfs配置
- HBase性能优化方法总结