I am trying to use a static library project across several application projects in Qt Creator (with Nokia Qt SDK).
My Qt Creator workspace is as follow:
/mylib > .pro + source + headers
/mylib-build-simulator/release > libmylib.a
/mylib-build-simulator/debug > libmylib.a
/myapp1 > .pro + source + headers
/myapp2 > .pro + source + headers
My lib project is compiling fine and creates libmylib.a in different folders depending on the build configuration.
So far, in my applications .pro I have:
But I have :
TEMPLATE = app
DEPENDPATH += ../mylib > this is to resolve the library headers, seems to work fine
POST_TARGETDEPS += ../mylib-build-simulator/debug/libmylib.a
LIBS += -L../mylib-build-simulator/debug/ -lmylib
POST_TARGETDEPS += ../mylib-build-simulator/release/libmylib.a
LIBS += -L../mylib-build-simulator/release/ -lmylib
error: No rule to make target `../mylib-build-simulator/debug/libmylib.a', needed by `debug\app1.exe'. Stop.
How can I make my app project to build the lib project?