Tutorial of kdevelop doesn't compile

Giuseppe Torelli torelli at alpha.szn.it
Wed Jul 31 16:04:11 BST 2002


 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