Why do we use -L and l preceeding .pro file lines
Unsolved
General and Desktop
-
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
L
in C++ code has nothing to do withL
in pro files.
LIBS variable specifies the arguments passed to the linker invocation.
The-L
parameter specifies a directory to look for linked libraries and-l
specifies a library name to look for in that directory, so a line like
LIBS += -LSomeDir/SomeSubdir/ -lsome
means "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.