Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compiling QtCreator 3.4.2 with Qt 5.5.0 reports error on qsingleapplication.h: using of incomplete class "QSharedMemory"
QtWS25 Last Chance

Compiling QtCreator 3.4.2 with Qt 5.5.0 reports error on qsingleapplication.h: using of incomplete class "QSharedMemory"

Scheduled Pinned Locked Moved Qt Creator and other tools
qtcreator 3.4.2qt 5.5.0compile-error
2 Posts 1 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JohnYork
    wrote on 17 Jul 2015, 11:54 last edited by
    #1

    Hello everyone !
    I'm compiling QtCreator v3.4.2 with Qt v5.5.0. The compiler I used is MinGW-w64 4.9.2 in MSYS2. But while compiling the cpp files who includes file qsingleapplication.h at path<QtCreator_Src_Dir>/src/shared/qtsingleapplication, the compiler report errors such as using of incomplete class 'QSharedMemory' ... blablabla.

    I'm also tried to compile this version of QtCreator with Qt v5.4.2, and using the same compiler. The compiling error didn't appear. So I think maybe there is something wrong with Qt v5.5.0? But there are too many difference between the source code of Qt5.4.2 and Qt5.5.0, and I can't find the code which caused error. Could anyone help? Thx!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JohnYork
      wrote on 18 Jul 2015, 16:14 last edited by
      #2

      Newest progress:
      Today after many times of compiling and testing, I found this error was caused by the definition of macro QT_NO_SHAREDMEMORY, it made the definition of class QSharedMemory unavailable in header file <QT_INSTALL_DIR>/include/QtCore/qsharedmemory.h.
      The macro QT_NO_SHAREDMEMORY is defined in qconfig.h, which is generated in my custom-building progress of Qt5.5.0. But the qconfig.h in official version of Qt5.5.0 does not contains the definition of that macro. So I guess whether the configure scripts generated this macro, because qconfig.h is generated by the scripts in file <QT_SRC_DIR>/qtbase/configure.
      After many times of testing, I found there is a part of script code which is very strange and make me confused. this part of script lies in line 4453 - 4463:

      # check IPC support
      if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
          # SYSV IPC is not supported - check POSIX IPC
          if compileTest unix/ipc_posix "ipc_posix" ; then
              QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC"
          else
              if [ "$XPLATFORM_ANDROID" = "no" ] ; then
                  QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY"
              fi
          fi
      fi
      

      As mentioned above, if the script found the compileTest of ipc_posix failed, and if the target platform is not android, then variable QCONFIG_FLAGS will be appended with QT_NO_SYSTEMSEMAPHORE and QT_NO_SHAREDMEMORY. Therefore the scripts between line 6662 and 6693 will generate the definition of macro QT_NO_SHAREDMEMORY in file qconfig.h.

      I'm doubted that why the SYSTEMSEMAPHORE and SHAREDMEMORY should be disabled while the target platform is not android. I guess maybe it is a clerical error and the code if [ "$XPLATFORM_ANDROID" = "no" ] ; should be if [ "$XPLATFORM_ANDROID" != "no" ] ;. But I'm not sure, could any one tell me?

      1 Reply Last reply
      0

      2/2

      18 Jul 2015, 16:14

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved