Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Failed to Build Qt 5.7



  • I am trying to build Qt 5.7. The build fails at the configure stage with a vast quantity of errors related to the build of qmake. The details are as follows:

    OS: Windows 8.1
    Compiler: MinGW gcc --version gives 5.3.0
    I have also installed Perl, Python and Ruby but the build never gets far enough to use them or at least I haven't seen any mention of them.

    I am doing a shadow build and running configure with the following options.

    ..\qt-everywhere-opensource-src-5.7.0\configure -release -opensource -prefix c:\Local\Qt-5.7 -platform win32-g++ -plugin-sql-mysql -plugin-sql-sqlite -opengl dynamic -icu -platform win32-g++

    However, I get exactly the same errors if I run configure with no parameters
    Obviously lots of people have built QT 5.7 perfectly well so it must be something I have done wrong probably with setting up the development environment but I have no idea what it is. If anyone can suggest something I would appreciate it.

    The results from running configure are: (with some repetition removed to reduce the size.

    g++ -c -o project.o -std=c++11 -DUNICODE -ffunction-sections -g -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/unix -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/win32 -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/mac -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/integrity -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/5.7.0 -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/5.7.0/QtCore -I../src/corelib/global -DHAVE_QCONFIG_CPP -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\mkspecs\win32-g++ -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/tools/shared -DQT_VERSION_STR="5.7.0" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=7 -DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_FOREACH -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp
    In file included from c:\local\mingw\include\wchar.h:208:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:44,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_ino_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_mode_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_off_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    .....

    c++\cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
    wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
    ^
    In file included from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::move(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:373:33: error: 'wmemmove' was not declared in this scope
    return wmemmove(__s1, __s2, __n);
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::copy(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:381:32: error: 'wmemcpy' was not declared in this scope
    return wmemcpy(__s1, __s2, __n);
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::assign(std::char_traits<wchar_t>::char_type*, std::size_t, std::char_traits<wchar_t>::char_type)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:389:30: error: 'wmemset' was not declared in this scope
    return wmemset(__s, __a, __n);
    ^
    Makefile:207: recipe for target 'project.o' failed
    mingw32-make: *** [project.o] Error 1
    del /f project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o cesdkhandler.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qringbuffer.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o qsettings_win.o qsystemlibrary.o registry.o
    Could Not Find E:\Software\Qt\qt-build\qtbase\qmake\project.o
    g++ -c -o project.o -std=c++11 -DUNICODE -ffunction-sections -g -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/unix -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/win32 -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/mac -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/generators/integrity -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/5.7.0 -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/5.7.0/QtCore -I../src/corelib/global -DHAVE_QCONFIG_CPP -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\mkspecs\win32-g++ -IE:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/tools/shared -DQT_VERSION_STR="5.7.0" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=7 -DQT_VERSION_PATCH=0 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_NO_FOREACH -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp
    In file included from c:\local\mingw\include\wchar.h:208:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:44,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_ino_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_mode_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_dev_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: '_off_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:173:14: error: 'time_t' does not name a type
    struct _stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: '_dev_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: '_ino_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: '_mode_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: '_dev_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: '_off_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:180:13: error: 'time_t' does not name a type
    struct stat __struct_stat_defined( _off_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: '_dev_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: '_ino_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: '_mode_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: '_dev_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: '__off64_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:188:17: error: 'time_t' does not name a type
    struct _stati64 __struct_stat_defined( __off64_t, time_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '_dev_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '_ino_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '_mode_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '_dev_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '__off64_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    c:\local\mingw\include\sys/stat.h:195:17: error: '__time64_t' does not name a type
    struct __stat64 __struct_stat_defined( __off64_t, __time64_t );
    ^
    In file included from c:\local\mingw\include\wchar.h:233:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:44,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\include\io.h:335:21: error: 'time_t' does not name a type
    struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
    ^
    c:\local\mingw\include\io.h:335:21: error: 'time_t' does not name a type
    struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
    ^
    c:\local\mingw\include\io.h:335:21: error: 'time_t' does not name a type
    struct _wfinddata_t __struct_finddata_t (time_t, _fsize_t);
    ^
    c:\local\mingw\include\io.h:336:24: error: 'time_t' does not name a type
    struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
    ^
    c:\local\mingw\include\io.h:336:24: error: 'time_t' does not name a type
    struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
    ^
    c:\local\mingw\include\io.h:336:24: error: 'time_t' does not name a type
    struct _wfinddatai64_t __struct_finddata_t (time_t, __int64);
    ^
    c:\local\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
    struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
    ^
    c:\local\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
    struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
    ^
    c:\local\mingw\include\io.h:362:24: error: '__time64_t' does not name a type
    struct __wfinddata64_t __struct_finddata_t (__time64_t, __int64);
    ^
    In file included from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:146:11: error: '::fwide' has not been declared
    using ::fwide;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:153:11: error: '::mbsinit' has not been declared
    using ::mbsinit;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:198:11: error: '::wmemcmp' has not been declared
    using ::wmemcmp;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:199:11: error: '::wmemcpy' has not been declared
    using ::wmemcpy;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:200:11: error: '::wmemmove' has not been declared
    using ::wmemmove;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:201:11: error: '::wmemset' has not been declared
    using ::wmemset;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:208:11: error: '::wmemchr' has not been declared
    using ::wmemchr;
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar: In function 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:229:61: error: invalid conversion from 'const wchar_t*' to 'wchar_t*' [-fpermissive]
    { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); }
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
    wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
    ^
    In file included from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static int std::char_traits<wchar_t>::compare(const char_type*, const char_type*, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:353:32: error: 'wmemcmp' was not declared in this scope
    return wmemcmp(__s1, __s2, __n);
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static const char_type* std::char_traits<wchar_t>::find(const char_type*, std::size_t, const char_type&)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:365:30: error: invalid conversion from 'const char_type* {aka const wchar_t*}' to 'wchar_t*' [-fpermissive]
    return wmemchr(__s, __a, __n);
    ^
    In file included from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:228:3: note: initializing argument 1 of 'wchar_t* std::wmemchr(wchar_t*, wchar_t, std::size_t)'
    wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
    ^
    In file included from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\string:40:0,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\random:40,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\stl_algo.h:66,
    from c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\algorithm:62,
    from e:\software\qt\qt-everywhere-opensource-src-5.7.0\qtbase\src\corelib\global\qglobal.h:94,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase\include/QtCore/qglobal.h:1,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmake_global.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeparser.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakeevaluator.h:36,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.h:32,
    from E:\Software\Qt\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/project.cpp:29:
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::move(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:373:33: error: 'wmemmove' was not declared in this scope
    return wmemmove(__s1, __s2, __n);
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::copy(std::char_traits<wchar_t>::char_type*, const char_type*, std::size_t)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:381:32: error: 'wmemcpy' was not declared in this scope
    return wmemcpy(__s1, __s2, __n);
    ^
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h: In static member function 'static std::char_traits<wchar_t>::char_type* std::char_traits<wchar_t>::assign(std::char_traits<wchar_t>::char_type*, std::size_t, std::char_traits<wchar_t>::char_type)':
    c:\local\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\char_traits.h:389:30: error: 'wmemset' was not declared in this scope
    return wmemset(__s, __a, __n);
    ^
    Makefile:207: recipe for target 'project.o' failed
    mingw32-make: *** [project.o] Error 1
    Building qmake failed, return code 2


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Not a direct answer, but I'd rather build Qt 5 with the MinGW provided by the installer, that way you should not get any surprises.



  • Hello,

    Thanks for the welcome and also the reply. That is a good idea. I'll give it a go now and report back.



  • @ccx004 Hi, Just to let you know that the qmake builds without any significant errors with the version of MinGW that is provided by the installer for the pre-built version of Qt. That version of MinGW and the one I downloaded have the same version numbers (i.e. 5.3) but they are obviously different in some other way - perhaps some extra libraries or header files. Anyway, I'll see if I can work out the differences tomorrow.



  • @SGaist Hi, Just to complete this. It needs to be built with MinGW-W64 and not MinGW-W32. It probably says this in big, bold letters somewhere and I missed it but just in case anyone else has the same problem, the errors I put in the first post are the errors you get when you build it with the 32 bit compiler.

    Best wishes....
    Colin Bruce


Log in to reply