c++ - How can I define qmake's library search directories? -


this question has answer here:

i'm working msvc code in qt creator, , build using msvc compiler. code uses constructions like:

#pragma comment(lib, "mylib.lib") 

how can instruct qmake, in .pro file, find these libraries? thought dependpath served purpose, doesn't seem work.

what should using instead?

p.s. please not tell me not portable bad code, know, not portable , that's ok

qmake has libs variable can set search directories, , libraries link. in case, like

libs += -lpath/to/lib/directory -lmylib 

would work , alleviate need #pragma altogether. note although uses unix-like syntax (-l library search directories , -l lib names without lib pre- , suffixes), qmake make sure right thing msvc well.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -