美文网首页
NS-3编程

NS-3编程

作者: Cabcab | 来源:发表于2018-11-12 16:27 被阅读0次

    .cc文件需要在.../ns-3.26/scratch目录下
    退出,回到ns-3.26目录,打开终端:
    运行

    ./waf
    

    看到输出类似:

    Waf: Entering directory `.../ns-3.26/build'
    [ 943/2483] Compiling scratch/first.cc
    [ 944/2483] Compiling scratch/subdir/scratch-simulator-subdir.cc
    [ 945/2483] Compiling scratch/scratch-simulator.cc
    [2467/2483] Linking build/scratch/scratch-simulator
    [2468/2483] Linking build/scratch/subdir/subdir
    [2471/2483] Linking build/scratch/first
    Waf: Leaving directory `.../ns-3.26/build'
    Build commands will be stored in build/compile_commands.json
    'build' finished successfully (38.579s)
    Modules built:
    antenna                   aodv                      applications              
    bridge                    buildings                 config-store              
    core                      csma                      csma-layout               
    dsdv                      dsr                       energy                    
    fd-net-device             flow-monitor              internet                  
    internet-apps             lr-wpan                   lte                       
    mesh                      mobility                  mpi                       
    netanim (no Python)       network                   nix-vector-routing        
    olsr                      point-to-point            point-to-point-layout     
    propagation               sixlowpan                 spectrum                  
    stats                     tap-bridge                test (no Python)          
    topology-read             traffic-control           uan                       
    virtual-net-device        wave                      wifi                      
    wimax                     
    
    Modules not built (see ns-3 tutorial for explanation):
    brite                     click                     openflow                  
    visualizer
    

    编译成功
    重点:'build' finished successfully
    运行:

    ./waf --run scratch/NAME
    

    即可


    Reference

    相关文章

      网友评论

          本文标题:NS-3编程

          本文链接:https://www.haomeiwen.com/subject/tgccfqtx.html