Hi,
Codebloks: Welcome to Code::Blocks 8.02!
OS: Ubuntu 9.0.2 jaunty
I have problems compiling a generated then expanded (uses slots) Qt application with moc-qt4 utility.
I was following the steps from
http://forums.codeblocks.org/index.php?topic=615.0 but I guess is pretty old because
the procedure from above link.
1 - Go to QT app properties and check the "this is a custom makefile" checkbox. requires that Makefile should exist (but I have no makefile because I've been using cb )
The prerequisites are:
- no make file. all Files are part of a cbp project
- The procedure as in above link
1 - Go to QT app properties and check the "this is a custom makefile" checkbox.
Now click on project's build options button, select the default brach at left and, in commands area, type the following into pre-build-steps:
qmake -project
qmake
2 - Make sure you have selected "invoke compiler directly" as the build method in settings->compiler->other.
3 - Compile the project; if you have includes of type "#include <QtGui>" those won't be found, returning errors. The makefile is now created.
4 - Change again the build method, now it must be "Work with makefiles" and try to compile again; it must work now.
yield when building:
/bin/sh: -f: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings
Then I tried to run moc-qt4 separate and generate moc_*.cpp. for 'Q_OBJECT' @ headers. I've added the fiels to project and
now I get
error: #error "This file was generated using the moc from 3.3.8b. It"
error: #error "cannot be used with the include files from this version of Qt."
error: #error "(The moc has changed too much.)"
then
/usr/include/qt3/private/qucom_p.h:75: error: function definition does not declare parameters
/usr/include/qt3/private/qucom_p.h:83: error: function definition does not declare parameters
...
Thank you