NS3 compilation and running

Source: Internet
Author: User

The header files imported before the program (also a series of header files combined with the module header files) are placed under ../build/debug/NS3.

 

First, we will introduce a simple method to allow examples and tests:
$./WAF configure -- enable-examples -- enable-Tests
$./WAF build

1. When build. py is run at one time
Forbidden: $./build. py
Allowed: $./build. py -- enable-examples -- enable-Tests
2. Run build with WAF for the first time
Forbidden:
$./WAF configure
$./WAF build
Allowed:
$./WAF configure -- enable-examples -- enable-Tests
$./WAF build

 

A file records the default configuration information and can modify its default parameters, that is, whether examples and tests are activated or locked by default:

File Name: utils/. ns3rc File $ Vim. ns3rc

Forbidden: # Set this equal to true if you want examples to be run.
Examples_enabled = false

# Set this equal to true if you want tests to be run.
Tests_enabled = false

Allowed:
# Set this equal to true if you want examples to be run.
Examples_enabled = true

# Set this equal to true if you want tests to be run.
Tests_enabled = true

After configuring the good luck environment, you can run it in the following ways:

./WAF -- run yourprogram // yourprogram. CC

./WAF -- pyrun yourprogram. py

Debug program:

./WAF -- run yourprogram -- command-template = "GDB % s"

The compiled executable file is stored in the directory.../debug/example/.... You can view it on your own.

You can directly run your own programs in the scratch/directory, and run the program configuration in other directories,

No relevant information is found. If you have any knowledge about the relevant materials or links, you can add them after learning.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.