Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-7285

Building a CMake project within QtCreator gives linker errors with QMutex

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 2.6.0-rc
    • Qt Creator 2.5.0-beta
    • None
    • Linux 64, Ubuntu 10.10, CMake 2.8.2, Qt Creator 2.5 beta, GCC 4.4

      I'm not really sure it's a bug with Qt Creator, it might be more with the Qt which is bundled with Qt Creator, but when I try and build a project which links against Qt (against my system libqt stuff on Ubuntu), building from within Qt Creator ends with the following:

      /opt/qtcreator-2.4.82/lib/libQtDBus.so.4: undefined reference to `QMutex::unlockInternal()'
      /opt/qtcreator-2.4.82/lib/libQtDBus.so.4: undefined reference to `QMutex::lockInternal()'
      /opt/qtcreator-2.4.82/lib/libQtDBus.so.4: undefined reference to `QMetaCallEvent::QMetaCallEvent(unsigned short, unsigned short, void (QObject*, QMetaObject::Call, int, void*), QObject const, int, int, int*, void*, QSemaphore)'

      The code I'm using doesn't use QMutex in any way directly, and I don't believe it uses DBus directly either.
      It's a CMake project, and if I go back to Qt Creator 2.4 or use CMake from the terminal without using Qt Creator in any way the project builds fine.
      I've tried clean builds too.

      I can only assume that Qt symbols are leaking somehow from Qt Creator, and confusing CMake, which is using the Qt Creator Qt libs instead of my system ones.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dt Daniel Teske
            ppearson Peter Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes