I'm going through a Makefile. Found this interesting bit of code, LIBS = -l:libevent.a
. Was digging through gcc documentation but didn't find anything relevant. Does anyone know what it means?
It instructs the linker to find and link a library with the exact name libevent.a
,
in the specified (-Ldir
) or default linker search directories, as opposed to
the usual convention whereby -lfoo
instructs the linker to find and link either libfoo.so
(shared library)
or libfoo.a
(static library), preferring libfoo.so
if both are found in the same search directory.
See the documentation of -lnamespec | --library=namespec
in the linker manual
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With