[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE2 helloworld.cpp



On  0, John Batistic <johnbat@win.co.nz> wrote:
> I am unable to compile the KDE2 helloworld.cpp example
> 
> error message from make:
> 
> g++    -c -o helloworld.o helloworld.cpp
> helloworld.cpp:2: qapplication.h: No such file or directory
> helloworld.cpp:3: qlabel.h: No such file or directory
> helloworld.cpp:4: qstring.h: No such file or directory
> make: *** [helloworld.o] Error 1
> 
> There appear to be two problems.
> 
> 1. $HOME/.profile is not being processed. PATH is not modified to the
> new settings as per the 'installing Qt/X11' reference documentation.
> 
> 2. If I force .profile with '. .profile' PATH etc are modified - but
> ignored.

I don't think your path has much to do with it.  If you have:

# apt-get install libqt-dev

and have these #includes in your helloworld.cpp:

#include <qt/qapplication.h>
#include <qt/qlabel.h>
#include <qt/qstring.h>

then you should be able to compile with:

g++ -c -o helloworld.o helloworld.cpp

Note also that the usual (proper?) way of naming C++ source is *.cc or
*.cxx, not *.cpp like M$ do.

Tom
-- 
Tom Cook
Information Technology Services, The University of Adelaide

"A child of five could understand this.  Fetch me a child of five."
	- Groucho Marx

Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au

Attachment: pgpZfNd9Wvwtm.pgp
Description: PGP signature


Reply to: