Srujan Simha
Srujan Simha

Reputation: 135

Add LDFLAGS in qt .pro field

How to add LDFLAGS in qt .pro field?

consider Library folder and shared library(.so) is in a dir_path folder.

For example, adding this line is not solving the issue LIBS+= -Ldir_path -llibrary_name

Any suggestions?

Upvotes: 6

Views: 9729

Answers (3)

anil valmiki
anil valmiki

Reputation: 301

use QMAKE_LDFLAGS for your requirement.

Upvotes: 0

macetw
macetw

Reputation: 1820

Make sure that you use "TEMPLATE = app" to get the correct behavior. Using the "lib" template would ignore the LIBS variable.

Upvotes: 0

hank
hank

Reputation: 9853

qmake has the QMAKE_LFLAGS variable for it.

You can read about qmake variables here.

Upvotes: 7

Related Questions