You normally only use the command "qmake -project" once. This generates a project file (something.pro). This contains various settings about your application and how to build it.
To make it link in an additional library, you add the LIBS variable to this file:
LIBS += -lmylib
LIBS += -lmylib
To copy to clipboard, switch view to plain text mode
(that's "-l" (small L) directly followed by the library name).
If the library is in a directory the linker doesn't look in, you add the path to it to the LIBS variable:
LIBS += -L/path/to/my/lib -lmylib
LIBS += -L/path/to/my/lib -lmylib
To copy to clipboard, switch view to plain text mode
On Windows, it is recommended to omit the -L, and just use the full path with -l, like:
LIBS += -lc:/path/to/my/lib/mylib.lib
LIBS += -lc:/path/to/my/lib/mylib.lib
To copy to clipboard, switch view to plain text mode
When you are done editing the .pro file, save it and run qmake -makefile. This generates a makefile from your .pro file. Run the makefile by typing "make".
This and much much more is all explained in qmake-manual.
Bookmarks