Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force relink when building in QT Creator

Tags:

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 QtCreator?

like image 280
Dan O Avatar asked Sep 28 '09 04:09

Dan O


1 Answers

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.

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

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

This forces the relink.

like image 135
Rob Avatar answered Oct 23 '22 01:10

Rob