ns3 waf配置遇到的一个问题

本文详细描述了在配置NS-3环境时遇到的冲突问题及其解决方案,涉及openflow与静态编译或MPI的冲突,通过修改配置命令避免了错误,并成功构建了所需模块。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在配置的时候,用以下命令 :
$ ./waf configure --enable-tests 
--enable-examples --with-nsclick=/home/gpf/click/  --with-openflow=/home/gpf/openflow --enable-sudo --enable-mpi--enable-static
$ ./waf
会显示错误:
openflow/build/default/libopenflow.a(switch_1.o): In function`main':  switch.c:(.text+0x0): multiple definitionof `main'

个人估计, openflow与--enable-static,或者--enable-mpi有冲突。

改正:
$ ./waf configure --enable-tests  --enable-examples --with-nsclick=/home/gpf/click/  --with-openflow=/home/gpf/openflow --enable-sudo
$ ./waf
OK

显示:
[1748/1749] SuidBuildTask
setting suid bit on executable/home/gpf/repos/ns-3-allinone/ns-3-dev/build/debug/src/emu/emu-sock-creator
[sudo] password for gpf:
[1749/1749] SuidBuildTask
setting suid bit on executable/home/gpf/repos/ns-3-allinone/ns-3-dev/build/debug/src/tap-bridge/tap-creator
Waf: Leaving directory`/home/gpf/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (26m20.503s)

Modules built:
aodv                                          applications                          bridge                                   
click                                        config-store                          core                                       
csma                                          csma-layout                            dsdv                                       
emu                                            energy                                      flow-monitor                       
internet                                  lte                                            mesh                                       
mobility                                  mpi                                            netanim                                 
network                                    nix-vector-routing              ns3tcp                                   
ns3wifi                                    olsr                                          openflow                               
point-to-point                      point-to-point-layout        propagation                         
spectrum                                  stats                                        tap-bridge                           
template                                  test                                          tools                                     
topology-read                        uan                                            virtual-net-device           
visualizer                              wifi                                          wimax 

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值