2. Compiling the Sample Applications
This section explains how to compile the DPDK sample applications.
2.1. To compile all the sample applications
Go to DPDK build directory:
cd dpdk/<build_dir>
Enable examples compilation:
meson configure -Dexamples=all
Build:
ninja
For additional information on compiling see
Compiling DPDK on Linux or
Compiling DPDK on FreeBSD.
Applications are output to: dpdk/<build_dir>/examples
.
2.2. To compile a single application
2.2.1. Using meson
Go to DPDK build directory:
cd dpdk/<build_dir>
Enable example app compilation:
meson configure -Dexamples=helloworld
Build:
ninja
2.2.2. Using Make
Pkg-config is used when building an example app standalone using make, please see Building Applications Using Installed DPDK for more information.
Go to the sample application directory. Unless otherwise specified the sample
applications are located in dpdk/examples/
.
Build the application:
make
To build the application for debugging use the DEBUG
option.
This option adds some extra flags, disables compiler optimizations and
sets verbose output.
make DEBUG=1