[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Newbie KFileDialog linking error/question
From: "Jason L. Buberel" <jason () buberel ! org>
Date: 2003-05-19 5:28:17
[Download RAW message or body]
Could anyone find the obvious error here... I am just starting to play around
with KDevelop (Gideon) 3.0.0a4 (KDE 3.1.1a on Gentoo Linux 1.4 using GCC
3.2.2 and libtool 1.4.1) and I am just putting together a simple HellWorld
application to get a feel for things.
The code snippet that I am working on is:
QString startDir = "/home/jason";
QString filter = "*";
QString caption = "Open a file";
QString otherFileName = KFileDialog::getOpenFileName(startDir, filter,
this, caption);
This compiles just fine, but I get the following error during link time:
source='helloworld.cpp' object='helloworld.o' libtool=no
depfile='.deps/helloworld.Po' tmpdepfile='.deps/helloworld.TPo' depmode=gcc3
/bin/sh /home/jason/src/kde/helloworld/admin/depcomp g++ -DHAVE_CONFIG_H -I.
-I/home/jason/src/kde/helloworld/src -I.. -I/usr/kde/3.1/include
-I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT
-Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -c -o
helloworld.o `test -f 'helloworld.cpp' || echo
'/home/jason/src/kde/helloworld/src/'`helloworld.cpp
/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith
-Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security
-Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -o
helloworld -R /usr/kde/3.1/lib -R /usr/qt/3/lib -R /usr/X11R6/lib
-L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3.1/lib main.o helloworld.o
-lkdeui
* helloworld.o(.text+0x9e1): In function `HelloWorld::fileOpen()':
* : undefined reference to `KFileDialog::getOpenFileName(QString const&,
QString const&, QWidget*, QString const&)'
* collect2: ld returned 1 exit status
* gmake[2]: *** [helloworld] Error 1
* gmake[2]: Target `all' not remade because of errors.
* gmake[1]: *** [all-recursive] Error 1
* gmake: *** [all] Error 2
I have verfied that the KDE libraries are indeed installed in /usr/kde/3.1/lib
(-L/usr/kde/3.1/lib, -R/usr/kde/3.1/lib). Other KDE and Qt classes appear to
link just fine when used in both static and non-static contexts (KURL,
KMessageBox::Information(), etc.). All other aspects of my KDE environment
appear to be working just fine (other installed KDE apps are definitely using
KFileDialog objects). I get basically the same error when I use
KFileDialog::getOpenURL() static method.
I have tried to 'Build -> Clean Project', then 'Build -> Run Automake &
Friends', then 'Build -> Run Configure' before trying to compile, link, and
run. The KDevelop project was created with the New Project Wizard.
Any help appreciated.
-jason
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic