Quick Start - Windows and MinGW
This guide will help you install and build your first PcapPlusPlus application on Windows using MinGW32 / MinGW-w64 in a few simple steps.
Table of contents
- Step 1 - install PcapPlusPlus
- Step 2 - create your first app
- Step 3 - create a Makefile
- Step 4 - build and run your app
Step 1 - install PcapPlusPlus
If you have MinGW with GCC version 5.3.0 or MinGW-w64 with GCC version 6.3.0 you can download a pre-compiled package from the latest release page.
Otherwise you need to build PcapPlusPlus from source.
Step 2 - create your first app
If you downloaded a pre-compiled package go to:
If you built it from source go to:
Make sure you see the following files:
|-- main.cpp |-- 1_packet.pcap
main.cpp is the example application we’ll use.
1_packet.pcap is a pcap file the app reads from.
Step 3 - create a Makefile
If you downloaded a pre-compiled package you can find a Makefile in
Drive:\path\to\your\package\example-app. This Makefile is already configured.
If you built it from source:
- go to
Step 4 - build and run your app
make to build the app:
.exe file will be created which contains the compiled app. You can now run it and should be able to see the following output:
Source IP is '10.0.0.138'; Dest IP is '10.0.0.1'