Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Error compiling with Qt 5.1.1 Mingw 4.8 on Windows 7
fatichar last edited by
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.
vrushali_deshpande last edited by
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.
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.