ok, i think i understand QProcess but what if I want the programs to compile together
on one makefile?
ok, i think i understand QProcess but what if I want the programs to compile together
on one makefile?
But do you want two separate executables?Originally Posted by chap19150
Makefiles for Qt programs are a bit complex, so you use qmake or some other tool to generate them. qmake can't create a single Makefile for two executables, but you can place those programs in separate directories and use a .pro file with TEMPLATE="subdirs" --- this way qmake will generate a Makefile that will run Makefiles from subdirectories (in other words you will have more than one Makefile, but you will be able to compile all programs with a single "make").
As sample:Originally Posted by jacek
dir structure .....Qt Code:
TEMPLATE = subdirs SUBDIRS = lib_sqlite_qt4 \ date_qdialog \ lib_tidy_src \ lib_wgetqt_src \ src_0To copy to clipboard, switch view to plain text mode
http://ciz.ch/svnciz/_STATIC_LIBS_QT4/
compile on mac , linux , window .
1- staticlibs from sqlite3
2- qdate libs calendar designer plug-in as static libs...
3- tidy libs to clean html bad & holocaust QTexEdit html
4- wget libs & network & smtp auth funktion
5- Final build the programm main.cpp included all libs.... the result one exe win or **.apps mac....
Last edited by patrik08; 12th June 2006 at 14:45.
ok, I have 2 directories /files/helloworld and /files/qtguiOriginally Posted by jacek
I have a makefile for the helloworld program. do I also
have to put a .pro file in the helloworld directory also, and if
so what would this contain?
No, you don't have to, but you need a .pro file in /files directory.Originally Posted by chap19150
Something like:Qt Code:
TEMPLATE = subdirs SUBDIRS += ./helloworld ./qtguiTo copy to clipboard, switch view to plain text mode
chap19150 (12th June 2006)
If You like external programm must go inside qt.....Originally Posted by chap19150
make a static lib from the programm ...
and on your header .... link the programm original header...
.... and call the function easy from qt ....
rewrite cout << to
sprintf (buffer, "%s%s", one , dwo);
return buffer;
Sample static libs programm...
http://ciz.ch/svnciz/_STATIC_LIBS_QT4/lib_tidy_src/
have a look on
http://ciz.ch/svnciz/_STATIC_LIBS_QT...b_tidy_src.pro
Qmake can compile a lot of programm ... put source on a dir...
cd dir .... qmake -project && qmake && make
Grab error and clean the code...
*** pro file LANGUAGE = C++ or LANGUAGE = C
if the code is ok ... remove main.cpp and transform to static libs... and call function from qt....
Better use QString and QTextStream instead.Originally Posted by patrik08
Bookmarks