example code I am using is
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
compile instruction is
./ppu-gcc -I/usr/local/Trolltech/Qt-4.5.1/include/Qt /home/Progs/testqt.c -o testqt
where this "-I/usr/local/Trolltech/Qt-4.5.1/include/Qt" means look for header files in the following directory "/usr/local/Trolltech/Qt-4.5.1/include/Qt"
and the error I get is
"Qtcore/qcoreapplication.h: No such file or directory"
and likewise similar errors for other header files which means that compiler cannot find the header files defined in qapplication.h, even after adding the required path in PATH env variable, it didnt help.
Bookmarks