Quoting man ld
-l namespec --library=namespec<br>
Add the archive or object file specified by
namespec
to the list of files to link. This option may be used any number of times. Ifnamespec
is of the form:filename
,ld
will search the library path for a file calledfilename
, otherwise it will search the library path for a file calledlibnamespec.a
.
On systems which support shared libraries,ld
may also search for files other thanlibnamespec.a.
Specifically, on ELF and SunOS systems, ld will search a directory for a library calledlibnamespec.so
before searching for one calledlibnamespec.a
. (By convention, a ".so" extension indicates a shared library.) Note that this behavior does not apply to:filename
, which always specifies a file calledfilename
.
Thus, -llibCListManager
means you want to link with a library named liblibCListManager.so
. For libCListManager.so
the correct option is -lCListManager
.