.so library files are dynamic library files and .a library files are static library files. If you want to pack a library inside your exe, you will need to use the static ‘.a’ files. In netbeans you can add them by going to your project’s properties. Go to linker, and select ‘Add library’ and select your .a file. (Ex: libpcap.a) Now when you build, Netbeans will pack the library into your exe and the header includes for the library will also be found. (Ex: #include <pcap.h> ) This is very nice when you don’t want your users to have to install a library to use your program. The downside is that your exe will be a bigger depending on the library’s size.