Results 1 to 6 of 6

Thread: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPaintB

  1. #1
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    Hi, all:


    I'm testing Qt5 . I have Qt5 installed at /opt/Qt5.0.1 (still with some Qt4 libraries installed at /usr/lib/i386-linux-gnu/ ) .
    However, whenever I tried to run my program, I got the following error message:


    QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 12.
    Aborted (core dumped)
    People gave out several solutions, including:
    1) make distclean ( refer to https://groups.google.com/forum/?fro...et/HTVYpo05-vw )
    2) I can't see a solution but the topic has already been closed here
    ( https://bugreports.qt-project.org/br...s:all-tabpanel )


    In addition,


    $ echo $PATH
    /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/Qt5.0.1/5.0.1/gcc/bin
    In my project .pro,

    LIBS += -L/usr/lib \

    # -L/usr/lib/i386-linux-gnu \

    -L/opt/Qt5.0.1/5.0.1/gcc/lib \
    clearly, I don't have Qt4 libraries linked, but only Qt5 library path included.










    So, how to solve this problem? Thanks.


    Pei


    Added after 25 minutes:


    It seems my problem comes from the newly installed Qt, due to the reason that I have Qt5 installed under /opt/Qt5 .
    However, in my .pro file,
    CONFIG += qt warn_on debug staticlib
    How can I make sure this project is able to find my manually installed Qt5 ?

    For now, the error
    fatal error: QGraphicsView: No such file or directory
    is telling I'm not able to find Qt5 ...


    cheers
    Pei
    Last edited by jiapei100; 21st February 2013 at 13:48.
    Welcome to Vision Open
    http://www.visionopen.com

  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: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    Path to Qt is embedded in qmake. So if you use qmake from Qt4, it will use Qt4, if you use qmake from Qt5, it will use Qt5.
    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.


  3. #3
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    Thanks wysota:

    Firstly:
    As you can see, I have

    bq. $ echo $PATH
    /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/Qt5.0.1/5.0.1/gcc/bin


    which means, I'm using qt5-qmake already !! In fact, I don't even have a 2nd qmake under /usr/bin



    Secondly:
    I guess the problem comes with QT configuration !! If I modify my original code from
    #include <QWidget>
    to
    #include <QtWidgets/QWidget>
    ,
    everything compiles !!!
    Which seems to hint after I successfully Qt5,
    CONFIG += qt
    doesn't configure Qt correctly.

    Anyway, I can compile my program now. But, how to solve the Qt configuration issue?


    Cheers
    Pei
    Welcome to Vision Open
    http://www.visionopen.com

  4. #4
    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: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    I don't know what you are using just by seeing the path order. Invoke qmake -v and see for yourself what you are using. As for the compilation -- if you want to use widgets, make sure your project file contains a QT += widgets entry and rerun qmake.
    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.


  5. #5
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    Hi, thank you so much for your prompt reply wysota.

    1)
    $ qmake -v
    QMake version 3.0
    Using Qt version 5.0.1 in /opt/Qt5.0.1/5.0.1/gcc/lib
    which means I'm using qt5.

    Qt Code:
    1. QT += Widgets
    To copy to clipboard, switch view to plain text mode 
    should make the trick. However, I got some new issues about qwt.


    2) I'm now trying to build qwt with new qt5 qmake. However, I don't know how to specify the installation folder ? I tried:
    qmake prefix=/usr
    make
    make install
    However, qwt is always installed to /usr/local/qwt-6.1.0-rc3/

    3) Even if I specify
    INCLUDEPATH += /usr/local/qwt-6.1.0-rc3/include \
    in .pro file, the project is still not able to find qwt include file, such as
    #include <qwt_painter.h>

    please do help. I need qwt for my project. Thank you .


    Best Regards
    Pei





    Quote Originally Posted by wysota View Post
    I don't know what you are using just by seeing the path order. Invoke qmake -v and see for yourself what you are using. As for the compilation -- if you want to use widgets, make sure your project file contains a QT += widgets entry and rerun qmake.
    Last edited by jiapei100; 22nd February 2013 at 04:08.
    Welcome to Vision Open
    http://www.visionopen.com

  6. #6
    Join Date
    Sep 2009
    Location
    Surrey, BC, Canada
    Posts
    110
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPa

    Hi, wysota:

    My qwt setting is of no problem now. However, this bug continues:

    QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 12.
    The program has unexpectedly finished.

    Any suggestions please?


    Thank you ...

    Best Regards
    Pei
    Welcome to Vision Open
    http://www.visionopen.com

Similar Threads

  1. Qt5: QMetaType error
    By Ginsengelf in forum Qt Programming
    Replies: 4
    Last Post: 22nd December 2012, 09:43
  2. Replies: 3
    Last Post: 21st June 2011, 06:25
  3. Replies: 4
    Last Post: 12th May 2011, 10:06
  4. Replies: 13
    Last Post: 10th March 2011, 07:35
  5. Replies: 6
    Last Post: 10th October 2010, 23: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.