Creator中构建时强制重新链接

Creator中构建时强制重新链接

本文介绍了在QT Creator中构建时强制重新链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我有一个subdirs项目,它包裹了几个库和一个主应用程序。当我改变一个库中的东西时,主应用程序不会与它们重新链接..任何人都有一个窍门让应用程序重新链接其静态链接的库,当使用QT Creator时自动链接?

I have a subdirs project which wraps a couple libraries and a main application. When I change something in one of the libraries the main application does not relink with them.. does anyone have a trick for getting an application to relink with its statically linked libs automatically when using QT Creator?

-Dan O

推荐答案

这里有一个解决方法,也是一个有趣的讨论

There is a workaround for this and also an interesting discussion on the subject (qmake seems to be the problem here) on the Qt Creator mailing list.

解决方法是添加一个 PRE_TARGETDEPS 命令到您的主要应用程序.pro文件,例如:

The workaround is to add a PRE_TARGETDEPS command to your main applications .pro file, e.g.:

PRE_TARGETDEPS += /path/to/your/lib.a

这将强制重新连接。

这篇关于在QT Creator中构建时强制重新链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 02:28