I want to compile a program with two libraries: lpcap and levent
but it seems to me that the commands for static compilation and dynamic compilation are the same
gcc -o myprogram main.c -lpcap -levent
if I want to make sure it is static compilation, how?
and how can I determine whether the lpcap and levent are static library or dynamic library?
I notice there are four libpcap library files,
how to determine which one is used?
especially there are 3 versions of libpcap.so, which one is used if I run the above command.
On systems which support shared libraries, ld may also search for files other than libnamespec.a. Specifically, on ELF and SunOS systems, ld will search a directory for a library called libnamespec.so before searching for one called libnamespec.a. (By convention, a .so extension indicates a shared library.) Note that this behavior does not apply to :filename, which always specifies a file called filename