Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build and Run two Qt project from a single . pro file



  • Hi,
    I have developed two separate applications a client and a server, which are build separately as they were separate projects, Now i want to build and run them together, so i created a folder and copied the two projects in the folder and created a .pro file which contains the following lines

    TEMPLATE = subdirs

    SUBDIRS += server client

    CONFIG += ordered

    when i build and run, two projects are build successfully, but only one project is run,
    I want both application to run together.

    Please suggest a solution.

    Thanks,
    Georgy Daniel


  • Moderators

    What about adding this in client.pro:
    @
    QMAKE_POST_LINK=./../server/your/build/dir/server
    @



  • It is not working as expected, this will invoke the application mentioned in the 'QMAKE_POST_LINK' only for a clean build and run, and the second application is run only when the first app is closed manually.


  • Moderators

    Then I think you need a separate script for that, or start the applications manually.



  • Thanks, but I saw a project (pretty huge project) which does invoke two applications,
    and in the application output log window of QT creator, it seems like only one application is invoked, I thought the first application is invoking the other, but i could not find any reference to second app in the first app.

    any ways thanks for you help.


Log in to reply