Add LDFLAGS to qt.pro field

How to add LDFLAGS to qt.pro field?

read the library folder and the shared library (.so) is in the dir_path folder.

For example, adding this line does not solve the problem LIBS + = -Ldir_path -llibrary_name

Any suggestions?

+4
source share
3 answers

qmake has a QMAKE_LFLAGS variable for it.

You can read about qmake variables here .

+4
source

Make sure you use "TEMPLATE = application" to get the correct behavior. Using the "lib" template ignores the LIBS variable.

0
source

use QMAKE_LDFLAGS for your requirements.

0
source

All Articles