[Solved]how to add dependency to a lib?
I found when my *.lib is re-created, the main project will not auto-build.
How to add dependency to a lib file in .pro?
thanks a lot.But it's not the answer of my question.
what I mean is :
when project is very large. you need sepreate it into modules. the "module" is a lib.
when you modify lib's source code, qt creator cannot make the root project auto-build.
That is what I called "dependency" to a .lib.
BTW, I have tried the method you applied. It doesn't work either.
no one know the answer? I can not believe that.
It is a very important feature for a building system.
When I first meet this problem, I was so surprising.
Here is my solution, now:
Delete the main output file every time, when you build project.
Well, the first (obvious) thing is to set dependencies in Project->Dependencies section. This will assure correct build order, but will not force your app to re-link on lib changes.
To achieve this adding this to the .pro file works for me:
PRE_TARGETDEPS += <path and name of your lib>
thanks a lot krzysztof.
But why qmake doesn't auto add dependency to it's libs:
through "LIBS +="?
can anybody from QT explain the reason?