-L
sets a directory in which the linker should search for libraries.
-l
sets a library file to link in the following way: -lalglib
will look for a file named libalglib.a in all directories that are set with -L
Adding a file to LIBS
without anything will link that exact file.
So either:
LIBS += alglib.a
or, provided that the alglib file name is libalglib.a:
LIBS += -Lalglib-directory -lalglib