本文介绍了如何在Qt中指定qmake的库文件依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个SomeLib.pro文件包含:

Have a SomeLib.pro file that contains:

CONFIG  += debug
TEMPLATE = lib
TARGET = SomeLib
..

然后在一个依赖的SomeApp.pro:

Then in a dependent SomeApp.pro:

..
debug:LIBS += -lSomeLib_debug
..

如果我在qmake中触摸SomeLib,我该如何强制SomeApp建立?

How can I force SomeApp to build if I touched SomeLib in qmake?

推荐答案

这是丑的,因为你需要给出确切的图书馆文件名,但这应该是有效的:

It's ugly because you need to give the exact library file name, but this should work:

TARGETDEPS + = libfoo.a

TARGETDEPS += libfoo.a

这篇关于如何在Qt中指定qmake的库文件依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-25 17:55