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

Re: qt-designer linking problem with kde parts

> -----Original Message-----
> On Sunday 01 August 2004 00:02, machoamerica wrote:
> > hi there,
> >
> > i'm building an application with qt3-designer.  things were going well as
> > long as i was using strictly qt parts (no kde parts), but when i tried
> > adding a KLineEdit the linker barfed.
> >
> > [foucault][macho ~]$ make
> > g++  -o junto .obj/main.o .obj/mainform.o .obj/edititemform.o
> > .obj/moc_mainform.o .obj/moc_edititemform.o  -L/usr/share/qt3/lib
> > -L/usr/X11R6/lib -L/usr/lib -lqt-mt -lXext -lX11 -lm
> >
> > .obj/mainform.o(.text+0x3fd6): In function 
> `MainForm::MainForm[not-in-charge](QWidget*, char const*, bool, unsigned)':
> > : undefined reference to `KLineEdit::KLineEdit[in-charge](QWidget*, char
> > : const*)'
> >
> > .obj/mainform.o(.text+0x7166): In function `MainForm::MainForm[in-charge]
> (QWidget*, char const*, bool, unsigned)':
> > : undefined reference to `KLineEdit::KLineEdit[in-charge](QWidget*, char
> > : const*)'
> >
> > collect2: ld returned 1 exit status
> > make: *** [junto] Error 1
> >
> > i have the -L/usr/lib option in the link command, and as far as i can tell,
> > the KLineEdit definition should be in one of the following kdelibs4-dev
> > files:
> >
> > [foucault][macho ~]$ ls /usr/lib/libkdeui.*
> > /usr/lib/libkdeui.la  /usr/lib/libkdeui.so.4
> > /usr/lib/libkdeui.so  /usr/lib/libkdeui.so.4.2.0
> >
> > but apparently g++ is not satisfied.  i'm running from the testing branch
> > of debian.  if anyone can see what i'm missing, i'd love to be filled in.
> You dont see to have a -lkde or -lkdeui (I forget which) you need to add - 
> just -L/usr/lib specifies the search path, but doesnt tell it to explicitly 
> link in any KDE libraries...

thanks for the prompt reply.  -lkdeui was the switch i needed.  
however, now, after compiling, my application segfaults whenever it 
tries to instantiate any of several kde parts (including KLineEdit 
and KDatePicker).  strangely, KSqueezedText seems to work fine, and 
stranger still, if i include a KDateTable, the programs will not 
compile.  i get:

[foucault][macho junto]$ make
 g++ -c -pipe -Wall -W -O2  -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/usr/share/qt3/mkspecs/default -I. -I/usr/include/kde -I/usr/include/qt3 -I.ui/ -I. -I.moc/ -o .obj/mainform.o .ui/mainform.cpp
.ui/mainform.cpp: In constructor `MainForm::MainForm(QWidget*, const char*,
   bool, unsigned int)':
.ui/mainform.cpp:103: error: no matching function for call to `KDateTable::
   KDateTable(QWidget*&, const char[12])'
/usr/include/kde/kdatetbl.h:251: error: candidates are:
   KDateTable::KDateTable(const KDateTable&)
/usr/include/kde/kdatetbl.h:262: error:
   KDateTable::KDateTable(QWidget*, QDate, const char*, unsigned int)
make: *** [.obj/mainform.o] Error 1

looks like qt-designer decided to call a constructor for KDateTable that doesn't exist.  KDateTable is expecting a date and a name, and it only gets sent a name.

is this still my fault, or is it time to submit a bug report?


Reply to: