[gloucs] compiling with qt

Paul Robertson gloucs@mailman.lug.org.uk
Sat Aug 24 09:21:00 2002


I don't know about the qt-developer package, but I do build qt
stuff every day.

Looking at the error messages, I'd say that you are trying to
link qt3 code against qt2 libraries. I don't know know how
you managed to compile the source files.

I'd say forget qt version 2 for now, or at least make a symlink
/usr/lib/qt which points to /usr/lib/qt3.

For completeness, you probably want these exports in
.bash_profile or somesuch place:

QTDIR=/usr/lib/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/dox/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QTDIR, PATH, MANPATH, LD_LIBRARY_PATH

That should help the compiler and linker find the right stuff.

-- 
Paul

----- Original Message ----- 
From: "Guy Edwards" <guy_j_edwards@hotpop.com>
To: "MAILING LIST" <gloucs@mailman.lug.org.uk>
Sent: Friday, August 23, 2002 7:51 PM
Subject: [gloucs] compiling with qt


> I've actually got a proper question (well...)
> 
> I've got qt installed and the qt-developer package (from the kde 3.0.3
> RPM packages) versions 2 and 3.
> 
> /usr/lib/qt2
> and
> /usr/lib/qt3 
> exist and have files in
> 
> I'm trying to compile and install some programs from source, eg quanta
> and cervisia, but all the compiles end whenever it's trying to find qt.
> 
> I've attached the end of the config.log below
> 
> I've googled and tried
> ./configure --with-qt-libraries="/usr/lib/qt2/lib/" and 
> ./configure --with-qt-libraries="/usr/lib/qt3/lib/"
> 
> I set these in the config file:
> ac_help="$ac_help
>   --with-extra-libs=DIR   adds non standard library paths"
> ac_help="$ac_help
>   --with-qt-dir="/usr/lib/qt3"       where the root of Qt is installed "
> ac_help="$ac_help
>   --with-qt-includes="/usr/lib/qt3/include"  where the Qt includes are."
> ac_help="$ac_help
>   --with-qt-libraries="/usr/lib/qt3/" where the Qt library is
> installed."
> 
> but with no luck...
> 
> "error: QT (>=Qt 2.2.1)(libraries)not found. Please check your
> installation!"
> 
> 
> any ideas?
> Guy
> 
> config.log
> -----------------------
> configure:4996: checking for Qt
> configure:5157: rm -rf SunWS_cache; g++ -o conftest -O2 -fno-exceptions
> -fno-check-new -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes
> -Wwrite-strings -Wno-long-long -fno-builtin -I/usr/lib/qt2/include
> -I/usr/X11R6/include   -L/usr/lib/qt2/lib/ -L/usr/X11R6/lib  conftest.C 
> -lqt -lpng -lz -lm -ljpeg  -lXext -lX11 -lSM -lICE  1>&5
> conftest.C: In function `int main()':
> conftest.C:15: warning: unused variable `QStringList*t'
> conftest.C:20: warning: unused variable `int magnolia'
> /root/tmp/ccofN74R.o: In function `main':
> /root/tmp/ccofN74R.o(.text+0x41): undefined reference to
> `QString::shared_null'
> /root/tmp/ccofN74R.o(.text+0x74): undefined reference to
> `QIconView::QIconView[in-charge](QWidget*, char const*, unsigned)'
> /root/tmp/ccofN74R.o(.text+0x84): undefined reference to
> `QIconView::setWordWrapIconText(bool)'
> /root/tmp/ccofN74R.o(.text+0x89): undefined reference to
> `QString::shared_null'
> /root/tmp/ccofN74R.o(.text+0xa9): undefined reference to
> `QString::setLatin1(char const*, int)'
> /root/tmp/ccofN74R.o(.text+0xc4): undefined reference to
> `QString::shared_null'
> /root/tmp/ccofN74R.o(.text+0xcf): undefined reference to
> `QStringData::deleteSelf()'
> /root/tmp/ccofN74R.o(.text+0xdb): undefined reference to
> `QIconView::~QIconView [in-charge]()'
> /root/tmp/ccofN74R.o(.text+0xf2): undefined reference to
> `QString::shared_null'
> /root/tmp/ccofN74R.o(.text+0x101): undefined reference to
> `QString::makeSharedNull()'
> /root/tmp/ccofN74R.o(.text+0x108): undefined reference to
> `QString::makeSharedNull()'
> collect2: ld returned 1 exit status
> configure: failed program was:
> #include "confdefs.h"
> #include <qglobal.h>
> #include <qapplication.h>
> #include <qapp.h>
> #include <qobjcoll.h>
> #include <qevent.h>
> #include <qstring.h>
> #include <qstyle.h>
> #include <qiconview.h>
> #if ! (QT_VERSION >= 221)
> #error 1
> #endif
> 
> int main() {
>     QStringList *t = new QStringList();
>     QIconView iv(0);
>     iv.setWordWrapIconText(false);
>     QString s;
>     s.setLatin1("Elvis is alive", 14);
>     int magnolia = QEvent::Speech; /* new in 2.2 beta2 */
>     return 0;
> }
> 
> 
> 
> 
> 
> _______________________________________________
> Gloucs mailing list
> Gloucs@mailman.lug.org.uk
> http://mailman.lug.org.uk/mailman/listinfo/gloucs