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
Post a Comment