.so vs .a library files

.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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s