QT5 beta1 and QtCreator 2.6.0

  • Hi,

    I am trying to build an application using QT 5 beta1 and QtCreator 2.6.0 on MacOS Mountain Lion. I added the widets and printsupport QT config options, but the linker seems to be unable to resolve all QGraphicsItem related code. I get an "Undefined symbols for architecture x86_64" error for all QGraphicsItem classes I use, for example "QGraphicsLineItem::QGraphicsLineItem(QGraphicsItem*, QGraphicsScene*)".

    Is the Graphics View code being moved to a separate module maybe? But all header files are still in the QtGui folders.

    I also tried to create a simple GUI with MainWindow applciation from scratch, and although QT5 seems to be supported already (greaterThan(QT_MAJOR_VERSION, 4): QT += widgets is added to the .pro file automatically), this project also produces an unresolved symbol link error, all for QWidget functions ending with "Changed". For example: "QWidget::fontChange(QFont const&)".

    Am I doing something wrong?

    Build information:

    • Mac OS Mountain Lion
    • Compiler: Clang (x86 64bit)
    • Qt version: Qt 5.0.0 (gcc_64)

    Edit I also tried using the GCC 64bit compiler, with the same results


  • Moderators

    You can try changing the linker from ld to g++. New Xcode versions have huge amount of problems with Qt ATM. Things will probably improve on the way. A good idea would be to check newest sources from gitorious, too.

  • I tried this on windows: I installed Visual C++ 2010, QT 5.0 beta1 and QtCreator 2.6.0. The project builds successfully, although I had to remove QtGui/ from a QGraphicsItem include. Apparently, on windows, the QGraphics* headers are in the QtWidgets headers folder?

    Edit I compiled QT5 on MacOS from git, and now it also compiles on Mac (although there are rendering issues). So essentially, the problem is fixed for me but I still hope this information was useful.

  • Moderators

    Qt 5 Beta 2 just came out. Give it a try; maybe the problem is already fixed

  • I can confirm that beta2 works out of the box, for both Windows XP and MacOS Mountain Lion.

    As a side note, the rendering issues I was having were due to to QPen that isn't cosmetic by default anymore. I use a scene with data in meters as units, so there is a lot of zooming involved. I think it would help if this was stated in the porting guide.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.