Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error compiling with Qt 5.1.1 Mingw 4.8 on Windows 7

Error compiling with Qt 5.1.1 Mingw 4.8 on Windows 7

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 3 Posters 2.7k 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.
  • F Offline
    F Offline
    fatichar
    wrote on last edited by
    #1

    Hi Guys,

    I just installed QT 5.1.1 with QT creator and MingW 4.8 on windows 7 32 bit. I am able to build and run sample applications.

    I created a Qt console app. in runs file with only main.cpp. I added a class that inherits QObject. It works fine. I added another such class, and it refuses to build. It builds (fine If I don't derive from QObject and don't use QT types as data members.) Getting a long list of errors like:
    (I also noticed that moc files are not generated anywhere, even for any examples)

    e:\qt\qt5.1.1\tools\mingw48_32\lib\gcc\i686-w64-mingw32\4.8.0\include\c++\bits\locale_classes.h:307: error: '__gthread_once_t' does not name a type
    static __gthread_once_t _S_once;
    ^
    e:\qt\qt5.1.1\tools\mingw48_32\lib\gcc\i686-w64-mingw32\4.8.0\include\c++\bits\locale_classes.h:344: error: '_Atomic_word' does not name a type
    mutable _Atomic_word _M_refcount;
    ^

    EDIT: I installed the VS version of QT, and code compiles fine.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vrushali_deshpande
      wrote on last edited by
      #2

      Hi,

      Even I am facing the same issue when I am trying to build my application using Qt 5.3.1 and Mingw 4.8.2.

      Is there any option other than installing VS version of QT? I want to compile my code only using mingw.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        ScottB
        wrote on last edited by
        #3

        I had a very similar problem. I solved it by looking through my inclusion tree. I had an include file (process.h) that was selected BEFORE the system's same named file!

        It was a simple fix: I renamed my header file.

        1 Reply Last reply
        0

        • Login

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