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.

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:
Posted in

Comments are closed, but trackbacks and pingbacks are open.