From kde-devel Thu Aug 23 17:33:23 2001 From: James Maes Date: Thu, 23 Aug 2001 17:33:23 +0000 To: kde-devel Subject: beginers problem : undefined reference X-MARC-Message: https://marc.info/?l=kde-devel&m=99858800601220 I am working though one of the online tutorials (http://perso.wanadoo.es/antlarr/tutorial/) And have came across this problem on example #3 The following line KURL filename = KFileDialog::getOpenURL( QString::null, "*", this ); in the code attached below gives this error when linking "undefined reference to 'KFileDialog::getOpenURL(QString const &, QString const &, QWidget *, QString const &)" Looking at the manuals and documentation I am at a lost as to why this statement is failing. getOpenURL is a static method of KFileDialog, and all the headers are included (AFAIK). Any help would be great. Thanks #include "p3.h" #include #include #include #include #include #include MainWindow::MainWindow ( const char * name ) : KMainWindow ( 0L, name ) { setCaption("KDE Tutorial - p3"); QPopupMenu *filemenu = new QPopupMenu; filemenu->insertItem( i18n( "&Open" ), this, SLOT(fileOpen()) ); filemenu->insertItem( i18n( "&Save" ), this, SLOT(fileSave()) ); filemenu->insertItem( i18n( "&Quit" ), kapp, SLOT(quit()) ); QString about = i18n("p3 1.0\n\n" "(C) 1999-2001 Antonio Larrosa Jimenez\n" "larrosa@kde.org\t\tlarrosa@suse.de\n" "Malaga (Spain)\n\n" "Simple KDE Tutorial\n" "This tutorial comes with ABSOLUTELY NO WARRANTY\n" "This is free software, and you are welcome to redistribute it\n" "under certain conditions\n"); QPopupMenu *helpmenu = helpMenu( about ); KMenuBar *menu = menuBar(); menu->insertItem( i18n( "&File" ), filemenu ); menu->insertSeparator(); menu->insertItem( i18n( "&Help" ), helpmenu ); QTextView *hello=new QTextView( i18n("

Hello World !


This is a simple" " window with Rich Text" " capabilities
Try to resize" " this window, all this is automatic !"), "", this ); setCentralWidget( hello ); } void MainWindow::fileOpen() { KURL filename = KFileDialog::getOpenURL( QString::null, "*", this ); QString msg = QString( i18n("Now this app should open the url %1 .") ).arg(filename.url()); KMessageBox::information( 0, msg, i18n( "Information"), "fileOpenInformationDialog" ); } void MainWindow::fileSave() { KURL filename=KFileDialog::getSaveURL( QString::null, "*", this ); } -- ------------------------------------ || James Maes || Senior Programmer || jmaes@sportingnews.com || The Sporting News || www.sportingnews.com || fantasy.sportingnews.com || radio.sportingnews.com ------------------------------------ "given enough time and resources we can accomplish anything" >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<