Setting Up Your Environment for C++ Developers
This section provides the information you need to get started developing C++ Wiretap client applications. It provides the names and locations of the header files and libraries needed, and provides sample compiler commands for Linux and macOS.
Location of Wiretap C++ Header Files
These two header files are in the api
subdirectory of your wiretap_install_dir:
WireTapClientAPI.h
WireTapTypes.h
Location of Wiretap C++ Library Files in SDK
The following table lists the names and paths of the library files for your platform.
OS | Platform | Library Install Path | Library File Name |
---|---|---|---|
Linux | x86_64 |
<wiretap_install_dir>/lib/opt/LINUX/x86_64/... |
libwiretapClientAPI.a<br>libwiretapClientAPI.so |
macOS | x86_64 /arm64 |
<wiretap_install_dir>/lib/opt/MACOSX/fat/... |
libwiretapClientAPI.a<br>libwiretapClientAPI.dylib |
Compiling the samples from the command line
This is an example on how to compile one of the samples from the Wiretap SDK.
Linux
On Linux, compiling with GCC is recommended.
Installing GCC
OS | Install command |
---|---|
Rocky 8 | sudo dnf install gcc-toolset-11 |
Rocky 9 | sudo dnf install gcc-toolset-12 |
Compiling with GCC
To ensure a consistent environment when compiling, start a shell with the gcc-toolset-11.
cd <wiretap_install_dir>
scl run gcc-toolset-11 sh
sh$ g++ --std=c++17 createProject.C -o createProject -I ../../api ../../lib/opt/LINUX/x86_64/RHEL/GCC_11_2_1/libwiretapClientAPI.a -lpthread -lcap -luuid -ldl
where,
<wiretap_install_dir>
is the path where the Wiretap SDK has been unziped.
MacOS
On macOS, compiling with Clang is recommended.
Installing Clang
The Clang command line compiler is available through Xcode developer tools. It can be installed using the following command:
xcode-select --install
Compiling with Clang
cd <wiretap_install_dir>
clang++ -std=c++17 createProject.C -o createProject -I ../../api ../../lib/opt/MACOSX/fat/12_4/CLANG_13_1_6/libwiretapClientAPI.a -lpthread -ldl -framework Carbon -framework SystemConfiguration
where,
<wiretap_install_dir>
is the path where the Wiretap SDK has been unziped.