Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Error compiling with Qt 5.1.1 Mingw 4.8 on Windows 7

    Installation and Deployment
    3
    3
    2391
    Loading More Posts
    • 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
      fatichar last edited by

      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 Reply Quote 0
      • V
        vrushali_deshpande last edited by

        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 Reply Quote 0
        • S
          ScottB last edited by

          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 Reply Quote 0
          • First post
            Last post