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

Re: Not able to compile Qt-Apps



On September 20, 2003 02:15 am, Thomas Baumann wrote:
> Hi there,
>
> I'm tring to install my new Debian-System (my first one). Everything is
> going quite fine, except that I am not able to compile any QT-Application
> (KDE as well). I searched the web all over for a couple of times, but I
> cannot find any solution ;((
>
> My system's state is testing and I took KDE and Qt from download.kde.org.
> I've also installed the devel-packs.
>
> Here's my dpkg -l | grep qt:
> ii  libqt3         3.1.2-0woody1  Qt Library
> ii  libqt3-headers 3.1.2-0woody1  Qt3 header files
> ii  libqt3-mt      3.1.2-0woody1  Qt GUI Library (Threaded runtime version)
> ii  libqt3-mt-dev  3.1.2-0woody1  Qt development files (Threaded)
> ii  qt3-dev-tools  3.1.2-0woody1  Qt3 development tools
> ii  qt3-doc        3.1.2-0woody1  Qt3 API documentation
>
> When I run configure on any Qt-Application, it always complains about not
> finding Qt.
>
> Here's a cut of my config.log:
>
>   configure:21977: checking for Qt
>   configure: 22045: /usr/share/qt3/include/qstyle.h
>   taking that
>   tried NO
>   configure:22154: rm -rf SunWS_cache; g++ -o conftest -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 -O2 -fno-exceptions
> -fno-check-new -I/usr/share/qt3/include -I/usr/X11R6/include 
> -DQT_THREAD_SUPPORT -D_REENTRANT -L/usr/share/qt3/lib
>   -L/usr/share/qt3/lib -L/usr/X11R6/lib   conftest.cc  -lqt-mt -lpng -lz
> -lm -ljpeg -ldl  -lXext -lX11 -lSM -lICE  -lpthread 1>&5
>
>   /tmp/ccZhliVQ.o(.text+0xe): In function `main':
>   : undefined reference to `QString::null'
>
>   /tmp/ccZhliVQ.o(.text+0x13): In function `main':
>   : undefined reference to `QStyleFactory::create(QString const&)'
>
>   /tmp/ccZhliVQ.o(.text+0x20): In function `main':
>   : undefined reference to `QCursor::QCursor[in-charge](int)'
>
>   /tmp/ccZhliVQ.o(.text+0x28): In function `main':
>   : undefined reference to `QCursor::~QCursor [in-charge]()'
>
>   collect2: ld returned 1 exit status
>   configure:22157: $? = 1
>   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 >= 0x030100)
>   #error 1
>   #endif
>
>   int main() {
>       (void)QStyleFactory::create(QString::null);
>       QCursor c(Qt::WhatsThisCursor);
>       return 0;
>   }
>   configure:22197: error: Qt (>= Qt 3.1.0) (library qt-mt) not found.
> Please check your installation!
>   For more details about this problem, look at the end of config.log.
>   Make sure that you have compiled Qt with thread support!
>
> I added /usr/share/qt3/lib to /etc/ld.so.conf and ran ldconfig, but the
> result is the same ;((
>
> When I try to compile the conftest.cc on my own, I get the following:
>
>   g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic
> -W -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500
> -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new
>   -I/usr/share/qt3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT
>   -D_REENTRANT -L/usr/share/qt3/lib -L/usr/share/qt3/lib -L/usr/X11R6/lib
>   conftest.cc -lqt-mt -lpng -lz -lm -ljpeg -ldl  -lXext -lX11 -lSM -lICE
>   -lpthread
>
>   conftest.cc:1:22: confdefs.h: No such file or directory
>
> I couldn't find confdefs.h on my system, so i asked apt-file, which told me
> that pike-7.4.21 would bring that file. So I gave that a try too, which
> results with:
>
>   g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic
> -W -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500
> -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new
>   -I/usr/share/qt3/include -I/usr/X11R6/include -I/usr/include/pike/7.4.21
>   -DQT_THREAD_SUPPORT  -D_REENTRANT -L/usr/share/qt3/lib
> -L/usr/share/qt3/lib -L/usr/X11R6/lib conftest.cc -lqt-mt -lpng -lz -lm
> -ljpeg -ldl  -lXext -lX11 -lSM -lICE  -lpthread
>
>   /tmp/ccPogQN9.o(.text+0xe): In function `main':
>   : undefined reference to `QString::null'
>
>   /tmp/ccPogQN9.o(.text+0x13): In function `main':
>   : undefined reference to `QStyleFactory::create(QString const&)'
>
>   /tmp/ccPogQN9.o(.text+0x20): In function `main':
>   : undefined reference to `QCursor::QCursor[in-charge](int)'
>
>   /tmp/ccPogQN9.o(.text+0x28): In function `main':
>   : undefined reference to `QCursor::~QCursor [in-charge]()'
>
>   collect2: ld returned 1 exit status
>
> Now I really do not have a clue of what's wrong. Maybe one of you can help
> me. I even wondered that there seems no one else to be, having this
> problem, as it is very common to compile Qt-Apps. Actually there are many
> problems with Qt, but ever single case could be fixed by installing some
> devel-deb's or finetuning ld... did I miss something????
>
> So _please_ help me, because I am starting to lose fun installing my very
> new Debian ;((
>

Hi,

try    ./configure --with-qt-dir=/usr/share/qt3

in general if configure can't find some libraries or includes run 
 ./configure --help  and it will give you options on how to specify the 
locations where you have these files installed.

hope this helps
Roy P.



Reply to: