l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2002 Apr 10 08:18

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] kde/qt programming question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] kde/qt programming question

I'm starting to read a few tutorials on kde/qt programming

One of the first programs they have you do has the following source:

#include <qapplication.h>
#include <qpushbutton.h>

int main( int argc, char **argv )
QApplication a( argc, argv );

QPushButton hello( "Hello world!" );
hello.resize( 100, 30 );

a.setMainWidget( &hello );
return a.exec();

When I first tried to compile it using "g++ 1.cpp -o 1" it gave me errors:
1.cpp:1:30: qapplication.h: No such file or directory
1.cpp:2:29: qpushbutton.h: No such file or directory

That said to me that it couldn't find the right libraries.
So from inside my /usr/include directory I did a:
ln -s /usr/lib/qt2/include qt2

and then modified the two include lines to read:
#include <qt2/qapplication.h>
#include <qt2/qpushbutton.h>

Well now I am getting:

In file included from /usr/include/qt2/qobjectdefs.h:42,
                 from /usr/include/qt2/qwindowdefs.h:43,
                 from /usr/include/qt2/qwidget.h:42,
                 from /usr/include/qt2/qapplication.h:42,
                 from 1.cpp:1:
/usr/include/qt2/qglobal.h:448:23: qfeatures.h: No such file or directory

Now qglobal.h and qfeatures.h are both inside the /usr/include/qt2 directory
so I know it's not a problem of the files not being there.  How or what
should I edit path/shell variable wise to get the compiler to look in all the
right spots to find all the right header files.

Thanks in advance


If anbody knows of a good programming tutorial for c/c++ on linux that goes
beyond your basic Hello World and on to something more advanced like how to
write say a basic text editor to teach you things could you send me the link?
 I've been searching google for a week now and just haven't found quite the
right thing.


vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.