Originally Posted by
marcel
Check the examples directory in your qt installation. There are some examples there.
I did that - but they all are independent applications. And I want only one executable out of it.
If you use more than one .pro file, it is assumed that you want to build more than one separate "thing" (subproject). In your case it is of course possible to build the subdirectiories as static libraries which would then be linked with the main application, but if you don't need that functionality, you'll get exactly the same code with a single project file.
Ok - i will like to try it with static libraries.
my subdir-pro:
CONFIG += staticlib
TEMPLATE = lib
TARGET = ../reader
CONFIG += staticlib
TEMPLATE = lib
TARGET = ../reader
To copy to clipboard, switch view to plain text mode
If I build the subdir it creates a libreader.a in the root-directory.
my root-pro:
TEMPLATE=app
LIBS += -L. -lreader
SUBDIRS += reader
TEMPLATE=app
LIBS += -L. -lreader
SUBDIRS += reader
To copy to clipboard, switch view to plain text mode
If I build the project if finds and uses the libreader.a file.
But "SUBDIRS += reader" in the root-pro is ignored. so i have to go manually in alls subdirs and build them. How can I tell the root-pro it should behave like app *and* subdirs (or any other solution?)
thanks,
niko
Bookmarks