Results 1 to 2 of 2

Thread: Fail to compile something rely on Qt4

  1. #1

    Default Fail to compile something rely on Qt4

    I am compiling bacula which rely on qt4.3 or above, but my only have qt4.2 so it reports following error

    ui/ui_main.h: In member function ‘void Ui_MainForm::setupUi(QMainWindow*)’:
    ui/ui_main.h:168: error: ‘class QGridLayout’ has no member named ‘setLeftMargin’
    ui/ui_main.h:169: error: ‘class QGridLayout’ has no member named ‘setTopMargin’
    ui/ui_main.h:170: error: ‘class QGridLayout’ has no member named
    ‘setRightMargin’
    ui/ui_main.h:171: error: ‘class QGridLayout’ has no member named
    ‘setBottomMargin’
    ui/ui_main.h:172: error: ‘class QGridLayout’ has no member named
    ‘setHorizontalSpacing’
    ui/ui_main.h:173: error: ‘class QGridLayout’ has no member named
    ‘setVerticalSpacing’
    ui/ui_main.h:224: error: ‘class QGridLayout’ has no member named ‘setLeftMargin’
    ui/ui_main.h:225: error: ‘class QGridLayout’ has no member named ‘setTopMargin’
    ui/ui_main.h:226: error: ‘class QGridLayout’ has no member named
    ‘setRightMargin’
    ui/ui_main.h:227: error: ‘class QGridLayout’ has no member named
    ‘setBottomMargin’
    ui/ui_main.h:228: error: ‘class QGridLayout’ has no member named
    ‘setHorizontalSpacing’
    ui/ui_main.h:229: error: ‘class QGridLayout’ has no member named

    I know this is due to mismatch of qt verison, so I download qt-x11-opensource-src-4.5.2.tar.gz from this site, install it to /usr/local/Trolltech/Qt-4.5.2 and set the following environment

    export QTDIR=/usr/local/Trolltech/Qt-4.5.2
    export PATH=$QTDIR/bin:$PATH
    export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
    export QTINC=$QTDIR/include
    export QTLIB=$QTDIR/lib

    after reboot the system, I didn't see it help! Am I doing something wrong? How to make qt-4.5.2 works in this problem?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Fail to compile something rely on Qt4

    Make sure you run make distclean and rerun qmake before running make again.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. how to compile c++ source file in qtCreator
    By orky7 in forum General Programming
    Replies: 6
    Last Post: 20th March 2009, 06:45
  2. Compile Application in XCode for Release. How?
    By Alex Snet in forum Installation and Deployment
    Replies: 7
    Last Post: 3rd February 2009, 09:16
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

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.