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

Re: Problems compiling "Hello World"-App



On Saturday 18 October 2003 11:17, Ralf Liebig wrote:
> Hello,
>
> I copied the source of the p2 example from the kde-3.0 developer
> tutorial a file called myapp.cpp.
> -------------- myapp.cpp --------------
> #include <kapp.h>

Use kapplication.h here

> #include <klocale.h>
> #include <qpushbutton.h>
>
> int main( int argc, char **argv )
> {
>     KApplication a( argc, argv , "myapp" );
>
>     QPushButton *hello=new QPushButton( i18n("Hello World !"), 0 );
>     hello->setAutoResize( TRUE );
>
>     QObject::connect( hello, SIGNAL(clicked()), &a, SLOT(quit()) );
>
>     a.setMainWidget( hello );
>     hello->show();
>
>     return a.exec();
> }
> -----------------------------------------------
>
> Then I tried to compile it with the following two g++ commands:
> ------------------first-step-----------------
> ralf@boron:~/Dokumente/kde_dev/myapp$g++ -I/usr/include/kde
> -I/usr/include/qt3 -Wall -g -O2 -c myapp.cpp

Your're missing the libraries to link to
-lkdecore -lqt-mt 

Cheers,
Kevin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Krammer <kevin.krammer@gmx.at>
Developer at the Kmud Project http://www.kmud.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Attachment: pgpS9WfeXnSOk.pgp
Description: signature


Reply to: