How to use an external lib in Qt project?

To add an external library to Qt project, you should know the answer to the following questions:

how to add lib search path in qt project?

LIBS += -L d:/dev/externallib/lib -l externallib.lib

how to add header file search path in qt project?

INCLUDEPATH += d:/dev/externallib/include

how to add compiler option to qt project?

QMAKE_CXXFLAGS += -std=c++0x

The macros are added to the .pro file of the project.

Posted in

Comments are closed, but trackbacks and pingbacks are open.