gcc library option with a colon, -l:libevent.a

前端 未结 1 432
旧巷少年郎
旧巷少年郎 2021-01-05 07:02

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 relevan

相关标签:
1条回答
  • 2021-01-05 07:46

    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

    0 讨论(0)
提交回复
热议问题