Why do we use -L and l preceeding .pro file lines
-
I know that L means an array of wide characters (wchar_t) instead of narrow characters (char)
But why do we have to use it in pro file?
And what mean lowercase -l before line ?
LIBS += -lX11 -
I know that L means an array of wide characters (wchar_t) instead of narrow characters (char)
But why do we have to use it in pro file?
And what mean lowercase -l before line ?
LIBS += -lX11@JacobNovitsky
Lin C++ code has nothing to do withLin pro files.
LIBS variable specifies the arguments passed to the linker invocation.
The-Lparameter specifies a directory to look for linked libraries and-lspecifies a library name to look for in that directory, so a line like
LIBS += -LSomeDir/SomeSubdir/ -lsomemeans "Look for library libsome in directory SomeDir/SomeSubdir/ and link it".See your linker documentation for more detailed explanation e.g. this one for the gnu linker.