由于在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
../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还没有编译成功,看来还是有些地方没有处理好。。。