Results 1 to 2 of 2

Thread: Example QtUiTools linker error

  1. #1
    Join Date
    Jun 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Example QtUiTools linker error

    Hi,

    I'm trying to use Qt 4.3.0 but got some severe problems concerning the QtUiTools.
    I'm using the example code from http://doc.trolltech.com/4.1/designe...orbuilder.html.

    First point, when I use
    #include <QtUiTools>
    as provided in calcsomething.cpp, the compiler says "no such file or directory" while all other includes are resolved correctly. But this I can fix by changing to
    #include <QtUiTools/quiloader.h>
    But then the linker doesn't do what I want him to.
    D:\Daten\workspace\qttest>make
    make -f Makefile.Debug
    make[1]: Entering directory `D:/Daten/workspace/qttest'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\qttest.exe" debug\calculatorfo
    rm.o debug\main.o debug\moc_calculatorform.o debug\qrc_calculatorbuilder.o -L"d
    :\Programme\Qt\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
    debug\calculatorform.o: In function `ZN14CalculatorFormC2EP7QWidget':D:/Daten/wo
    rkspace/qttest/calculatorform.cpp:32: undefined reference to `QUiLoader::QUiLoad
    er(QObject*)'
    :D:/Daten/workspace/qttest/calculatorform.cpp:36: undefined reference to `QUiLoa
    der::load(QIODevice*, QWidget*)'
    :D:/Daten/workspace/qttest/calculatorform.cpp:49: undefined reference to `QUiLoa
    der::~QUiLoader()'
    :D:/Daten/workspace/qttest/calculatorform.cpp:49: undefined reference to `QUiLoa
    der::~QUiLoader()'
    debug\calculatorform.o: In function `ZN14CalculatorFormC1EP7QWidget':D:/Daten/wo
    rkspace/qttest/calculatorform.cpp:32: undefined reference to `QUiLoader::QUiLoad
    er(QObject*)'
    :D:/Daten/workspace/qttest/calculatorform.cpp:36: undefined reference to `QUiLoa
    der::load(QIODevice*, QWidget*)'
    :D:/Daten/workspace/qttest/calculatorform.cpp:49: undefined reference to `QUiLoa
    der::~QUiLoader()'
    :D:/Daten/workspace/qttest/calculatorform.cpp:49: undefined reference to `QUiLoa
    der::~QUiLoader()'
    collect2: ld returned 1 exit status
    make[1]: *** [debug\qttest.exe] Error 1
    make[1]: Leaving directory `D:/Daten/workspace/qttest'
    make: *** [debug] Error 2
    If I add -lqtuitools to linker parameters it makes matters worse and I get thousands of errors like
    d:\Programme\Qt\lib/libqtuitools.a(properties.o):properties.cpp:(.text $_Z13qvari
    ant_castI7QPixmapET_RK8QVariant[QPixmap qvariant_cast<QPixmap>(QVariant const&)]
    +0x141): undefined reference to `_imp___ZN7QPixmapC1Ev'
    But even googleing couldn't solve my problem. Any ideas? "Normal" Qt projects compile & link fine, it's (for the moment) only qtuitools making problems.

    I'm using Windows XP SP2, latest MinGW (5.1.3) with gcc-3.4.2, Qt 4.3.0 OpenSource and Eclipse 3.2.2. But calling qmake/make from command line doesn't make a difference.

    If anyone has an idea, please tell me.

    So far
    Phil

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Example QtUiTools linker error

    Add "CONFIG += uitools" to your .pro file or its equivalent in your build environment (see $QTDIR/mkspecs/features/uitools.prf for details).

Similar Threads

  1. Installation on Fedora Core 4
    By jcr in forum Installation and Deployment
    Replies: 3
    Last Post: 29th January 2009, 02:34
  2. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 13:19
  3. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 25th August 2006, 00:31
  4. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 13:52
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 13:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.