Tutorial of kdevelop doesn't compile

Giuseppe Torelli torelli at alpha.szn.it
Thu Aug 1 10:19:49 BST 2002


Hi Frank,

thank you so much for your reply, however I still have problems:

$ ./test

FAILURE (KCmdLineArgs):
Application has not called KCmdLineArgs::init(...).

What else ? I'm so confusing, I have copied the c++ code directly from 
Kdevelop tutorial page ! 

Do you have a better tutorial on how to build a gui with KDE ??

Thanks,
Giuseppe

Alle 21:57, mercoledì 31 luglio 2002, hai scritto:
> Hallo Giuseppe,
>
> I think, you have forgotten the KDE-libraries.
> Add -lkdecore at minimum to your command line. Also, I think you have to
> use -lqt-mt.
>
> Frank
>
> >  Hi,
> >
> > I'm a newbie, I'm trying to compile the
> > following code:
> >
> > #include <kapp.h>
> > #include <kapplication.h>
> > #include <qpushbutton.h>
> >
> > int main( int argc, char **argv )
> > {
> >     KApplication a( argc, argv);
> >
> >     QPushButton *hello=new QPushButton("Hello World !", 0 );
> >     hello->setAutoResize( TRUE );
> >
> >     QObject::connect( hello, SIGNAL(clicked()), &a, SLOT(quit()) );
> >
> >     a.setMainWidget( hello );
> >     hello->show();
> >
> >     return a.exec();
> > }
> >
> > with this command line:
> >
> > $ g++ -I /usr/lib/qt3-gcc2.96/include/ -L /usr/lib/qt3-gcc2.96/lib/ -L
> > /usr/lib/kde3/ -I /usr/include/kde -lqt -o test test.cpp
> >
> > but I get this error:
> >
> > /tmp/cc5GDAkC.o: In function `main':
> > /tmp/cc5GDAkC.o(.text+0x3a): undefined reference to
> > `KApplication::KApplication(bool, bool)' /tmp/cc5GDAkC.o(.text+0x16b):
> > undefined reference to `KApplication::~KApplication(void)'
> > /tmp/cc5GDAkC.o(.text+0x1d5): undefined reference to
> > `KApplication::~KApplication(void)' collect2: ld returned 1 exit status
> >
> > Could you help me to solve this problem ?
> >
> > Thanks,
> > Giuseppe Torelli


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list