C++编译不通过,求帮助

代码中用到了开源解析工具rapidxml.hpp,里面有用到assert断言,编译的时候报错:
In file included from /usr/include/features.h:361:0,
from /usr/local/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/os_defines.h:39,
from /usr/local/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu/bits/c++config.h:426,
from /usr/local/gcc-4.8.2/include/c++/4.8.2/bits/stl_algobase.h:59,
from /usr/local/gcc-4.8.2/include/c++/4.8.2/list:60,
from ./src/include/service-rule/DCRule.h:28,
from ./src/include/service-rule/DCOweChargeRule.h:24,
from ./src/source/service-rule/DCOweChargeRule.cpp:21:
/usr/include/assert.h:66:1: error: expected constructor, destructor, or type conversion before 'extern'
__BEGIN_DECLS

检查了/usr/include/assert.h文件,里面用到__BEGIN_DECLS的这个宏,在/usr/include/sys/cdefs.h 中有定义,可是编译就是不通过,毫无头绪
跪求帮忙,

3个回答

你看看能不能解决你的问题
http://blog.csdn.net/pingd/article/details/40855367

去掉断言判断,或是增加c99编译方式

你用的什么编译器啊?建议换个新版本的编译器看看

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问