Ubuntu下编译Coin3D时,提示“cc_debugerror_post”错误的解决办法

6 篇文章 0 订阅
1 篇文章 0 订阅
在Ubuntu下编译Coin3D时,使用的gcc如果是4.6版,会给出错误提示:

../../include/Inventor/SbVec2s.h:72:83:   required from here
../../include/Inventor/SbBasic.h:99:5: error: 'cc_debugerror_post' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
In file included from ../../include/Inventor/errors/SoDebugError.h:28:0,
                 from ../../include/Inventor/SbVec2s.h:32,
                 from ../../include/Inventor/SbViewportRegion.h:28,
                 from ../../include/Inventor/actions/SoGLRenderAction.h:30,
                 from SoGLRenderAction.cpp:56:
../../include/Inventor/C/errors/debugerror.h:59:19: note: 'void cc_debugerror_post(const char*, const char*, ...)' declared here, later in the translation unit
In file included from ../../include/Inventor/actions/SoAction.h:27:0,
                 from ../../include/Inventor/actions/SoGLRenderAction.h:27,
                 from SoGLRenderAction.cpp:56:


此时,需要为编译指定使用gcc4.7做编译器,并使用 -fpermissive 选项。
参考ubuntu 官方的bug说明 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667139

命令如下:

./configure CCFLAGS=-fpermissive CXXFLAGS=-fpermissive  CC=gcc-4.7 CXX=g++-4.7 --prefix=/home/anklean/work/repos
make
make install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值