ns3编译出现cc1plus: warning being treated as errors的解决方法

由于在configure时出现了三个模块没有编译:click openflow和visualizer,找了几篇帖子,发现都说click跟openflow是根据具体情况看是否编译的,但是visualizer一般都能编译成 模块。

因此根据http://www.nsnam.org/wiki/index.php/PyViz中的解决方法进行编译,但是在运行./waf --pyrun src/flow-monitor/examples/wifi-olsr-flowmon.py  --visualize命令时,出现如下错误:

[1456/1892] cxx: src/ndnSIM/model/ccnx-content-store-lru.cc -> build/src/ndnSIM/model/ccnx-content-store-lru.cc.1.o

cc1plus: warnings being treated as errors
../src/ndnSIM/model/ccnx-content-store-lru.cc: In member function ‘virtual void ns3::CcnxContentStoreLru::Print() const’:
../src/ndnSIM/model/ccnx-content-store-lru.cc:124:3: error: unused variable ‘item’

Waf: Leaving directory `/home/ns-3-all/ns-3-dev/build'

解决方法:
一般的解决方法都是说Makefile中修改Werror,但是ns3中没有Makefile
在这个网页中找到方法http://www.nsnam.org/wiki/index.php/Troubleshooting

 export CXX=g++44
 ./waf configure && ./waf


后来再次遇到这个问题,采用了上述的方法,在./waf configure时出现错误:“could not configure a c++ compiler!”查看config.log,发现显示from /ns-3: Could not determine the compiler version ['g++44', ‘-dm’, '-E', '-'].

应该是编译器版本出现问题,可以用:unset CXX命令解除环境变量的限制。


运行上面命令后,warning being treated as error问题解决了,但是visualizer还没有编译成功,看来还是有些地方没有处理好。。。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值