Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Building multiple binaries in one qt project
Forum Update on Tuesday, May 27th 2025

Building multiple binaries in one qt project

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 19.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    donitaroid
    wrote on 22 Mar 2012, 03:01 last edited by
    #1

    I need to build multiple binaries(executable file .exe) from multiple source files(.cpp with main() inside) in one single qt project. I was using Qt creator to create qt project file. There is seems no options while creating new project.
    How to build multiple binaries in one qt project?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p-himik
      wrote on 22 Mar 2012, 03:53 last edited by
      #2

      You have to create separate projects one for each .exe you need. And than you can combine them into one "subdirs project":http://qt-project.org/doc/qt-4.8/qmake-project-files.html#project-templates .

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on 22 Mar 2012, 09:33 last edited by
        #3

        Indeed, using a subdirs project is the only way you can do this with qmake. Note that that may be different with cmake and qbs (a qt new build system that is in the experimental phase now).

        1 Reply Last reply
        0
        • I Offline
          I Offline
          ibingow
          wrote on 23 Mar 2012, 02:32 last edited by
          #4

          Use subdirs template. You can create a dir for each program. Here is an example how to use multipule pro in 1 dir.

          @TEMPLATE = subdirs
          SUBDIRS = app1 app2

          app1.file = src/app_1.pro
          app2.file = src/app_2.pro@

          1 Reply Last reply
          0

          1/4

          22 Mar 2012, 03:01

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved