Building multiple binaries in one qt project
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?
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 .
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).
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@