Problems creating projects

Martin Bammer e9525103 at stud4.tuwien.ac.at
Sun Feb 16 16:15:25 GMT 2003


Hi,

I have now installed and compiled lib-qt from source to /usr/local/qt how it 
is described in the INSTALL-File. With some modifications in the Project 
Options "configure" now runs without error, but when c++ wants to link the 
objects I get a lot of unresolved symbols. It seems that c++ uses the wrong 
libraries. How can I tell c++ to use my self compiled lib-qt?
Part of the output is:

c++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o test testview.o 
testdoc.o test.o main.o test.moc.o testview.moc.o testdoc.moc.o 
test_meta_unload.o -L/usr/X11R6/lib -L/usr/local/qt/lib -L/usr/lib 
/usr/lib/libkio.so -L/usr/lib/gcc-lib/i386-linux/2.95.4 /usr/lib/libkdesu.so 
-lresolv -lutil /usr/lib/libfam.so /usr/lib/libkdeui.so -lresolv 
/usr/lib/libkdecore.so /usr/lib/libDCOP.so -ldl -lresolv -lXinerama 
/usr/lib/libart_lgpl_2.so /usr/lib/libkdefx.so -lXrender -lstdc++ -lc -lgcc 
-lqt-mt -lpng -lz -lm /usr/lib/libjpeg.so -lXext -lX11 -lresolv -lSM -lICE 
-lpthread -lresolv -Wl,--rpath -Wl,/usr/lib -Wl,--rpath -Wl,/usr/local/qt/lib 
-Wl,--rpath -Wl,/usr/X11R6/lib 
testdoc.o(.text+0x2f): In function `TestDoc::TestDoc[not-in-charge](QWidget*, 
char const*)': 
/usr/local/qt/include/qstring.h:764: undefined reference to 
`KURL::KURL[in-charge]()' 
testdoc.o(.text+0xa9): In function `TestDoc::TestDoc[in-charge](QWidget*, char 
const*)': 
/home/martin/test/test/testdoc.cpp:36: undefined reference to 
`KURL::KURL[in-charge]()' 
testdoc.o(.text+0x10e): In function `TestDoc::~TestDoc [not-in-charge]()': 
/home/martin/test/test/testdoc.cpp:47: undefined reference to `KURL::~KURL 
[in-charge]()' 
testdoc.o(.text+0x15a): In function `TestDoc::~TestDoc [in-charge]()': 
/home/martin/test/test/testdoc.cpp:47: undefined reference to `KURL::~KURL 
[in-charge]()' 
testdoc.o(.text+0x1a6): In function `TestDoc::~TestDoc [in-charge 
deleting]()': 
/home/martin/test/test/testdoc.cpp:47: undefined reference to `KURL::~KURL 
[in-charge]()' 
testdoc.o(.text+0x224): In function `TestDoc::setURL(KURL const&)': 
/home/martin/test/test/testdoc.cpp:60: undefined reference to 
`KURL::operator=(KURL const&)' 
testdoc.o(.text+0x2cc): In function `TestDoc::saveModified()': 
/home/martin/test/test/testdoc.cpp:89: undefined reference to 
`KStdGuiItem::no()' 
testdoc.o(.text+0x2dc):/home/martin/test/test/testdoc.cpp:89: undefined 
reference to `KStdGuiItem::yes()' 
testdoc.o(.text+0x2f4):/home/martin/test/test/testdoc.cpp:89: undefined 
reference to `i18n(char const*)' 
testdoc.o(.text+0x309):/home/martin/test/test/testdoc.cpp:89: undefined 
reference to `i18n(char const*)' 
testdoc.o(.text+0x318):/home/martin/test/test/testdoc.cpp:89: undefined 
reference to `KMessageBox::warningYesNoCancel(QWidget*, QString const&, 
QString const&, KGuiItem const&, KGuiItem const&, QString const&, int)' 


Regards, Martin


> > Hi,
> >
> > On Sunday 16 February 2003 11:08, you wrote:
> > > Hi,
> > >
> > > I have installed kde3.1, kdevelop 2.1.3 and qt 3.1.1 and running Debian
> > > sid. When I create a normal KDE-Project I get the following output:
> > >
> > > shell-init: could not get current directory: getcwd: cannot access
> > > parent directories: No such file or directory
> > > shell-init: could not get current directory: getcwd: cannot access
> > > parent directories: No such file or directory
> > > configure: error: Qt (>= Qt 3.0.1) (library qt-mt) not found. Please
> > > check your installation!
> > > For more details about this problem, look at the end of config.log.
> >
> > what does the end of config.log tell you?
> >
> > Best regards,
> > Harry
>
> configure:6853: checking for Qt
> configure: 6917: /usr/lib/qt3/include/qstyle.h
> configure: 6917: /usr/lib/qt3/qstyle.h
> configure: 6917: /usr/lib/qt/include/qstyle.h
> configure: 6917: /usr/lib/qt/qstyle.h
> configure: 6917: /usr/local/qt/include/qstyle.h
> taking that
> tried NO
> tried /usr/lib/qt3/lib
> tried /usr/lib/qt3
> tried /usr/lib/qt/lib
> tried /usr/lib/qt
> tried /usr/X11R6/lib
> configure:7029: rm -rf SunWS_cache; c++ -o conftest -O2 -O0 -g3 -Wall
> -fno-exceptions -fno-check-new -I/usr/local/qt/include -I/usr/X11R6/include
> -DQT_THREAD_SUPPORT  -D_REENTRANT  -L/usr/lib -L/usr/X11R6/lib   conftest.C
> -lqt-mt -lpng -lz -lm -ljpeg -ldl  -lXext -lX11 -lSM -lICE  -lresolv
> -lpthread 1>&5
> /tmp/cckeHjbx.o(.text+0x14): In function `main':
> /home/martin/test/conftest.C:12: undefined reference to `QString::null'
> /tmp/cckeHjbx.o(.text+0x19):/home/martin/test/conftest.C:12: undefined
> reference to `QStyleFactory::create(QString const&)'
> /tmp/cckeHjbx.o(.text+0x2a):/home/martin/test/conftest.C:13: undefined
> reference to `QCursor::QCursor[in-charge](int)'
> /tmp/cckeHjbx.o(.text+0x39):/home/martin/test/conftest.C:14: undefined
> reference to `QCursor::~QCursor [in-charge]()'
> collect2: ld returned 1 exit status
> configure: failed program was:
> #include "confdefs.h"
> #include <qglobal.h>
> #include <qapplication.h>
> #include <qcursor.h>
> #include <qstylefactory.h>
> #include <private/qucomextra_p.h>
> #if ! (QT_VERSION >= 301)
> #error 1
> #endif
>
> int main() {
>     (void)QStyleFactory::create(QString::null);
>     QCursor c(Qt::WhatsThisCursor);
>     return 0;
> }
>
> -
> to unsubscribe from this list send an email to
> kdevelop-request at kdevelop.org with the following body: unsubscribe
> »your-email-address«

-
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