Compile error Qt Source

I have looked at solving this problem to no avail. When compiling Qt, it works fine for about 60 seconds until I get this and it kicks me out:

In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
             from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
             from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h
:65,
             from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
             from ..\..\..\include/QtCore/../../src/corelib/global/qglobal.h
:89,
             from ..\..\..\include/QtCore/qglobal.h:1,
             from ..\..\..\include/QtCore/../../src/corelib/tools/qalgorithm
s.h:45,
             from ..\..\..\include/QtCore/qalgorithms.h:1,
             from ..\..\..\include/QtCore/../../src/corelib/tools/qvector.h:
45,
             from ..\..\..\include/QtCore/qvector.h:1,
             from ..\..\..\include\QtCore/../../src/corelib/tools/qstack.h:4
5,
             from ..\..\..\include\QtCore/qstack.h:1,
             from parser.h:45,
             from moc.h:45,
             from moc.cpp:42:
c:\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
 { return (float)(_hypot (x, y)); }
                          ^
Makefile.Release:307: recipe for target '.obj/release/moc.o' failed
mingw32-make[4]: *** [.obj/release/moc.o] Error 1
mingw32-make[4]: Leaving directory 'C:/Qt/QtS/qtbase/src/tools/moc'
Makefile:34: recipe for target 'release' failed
mingw32-make[3]: *** [release] Error 2
mingw32-make[3]: Leaving directory 'C:/Qt/QtS/qtbase/src/tools/moc'
Makefile:82: recipe for target 'sub-moc-make_first' failed
mingw32-make[2]: *** [sub-moc-make_first] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/QtS/qtbase/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/QtS/qtbase'
Makefile:63: recipe for target 'module-qtbase-make_first' failed
mingw32-make: *** [module-qtbase-make_first] Error 2

C:\Qt\QtS>

      

I am compiling with MinGW and this is my first experience with compiling from source, so I am stumped on what to do.

+3


source to share


1 answer


If you Google a little for error: '_hypot' was not declared in this scope

, you will find several reports from several different projects. Looks like MinGW bug. There isn't too much you can do if it's true.

Do you really need 32-bit Qt? According to Google, at least one 64-bit MinGW does not have this error.

I would try. Perhaps you can find a newer version of MinGW?



http://mingw-w64.yaxm.org/doku.php

EDIT: Just found: https://wiki.qt.io/MinGW

There are binary installers targeting MinGW for Qt 4 and Qt 5. Prior to Qt 4.8.6, Qt 4 was built with the MinGW.org toolbox using gcc 4.4. The new Qt 4.8 bitpacks come with the mingw-w64 based Toolkit. Qt 5 actually requires the new MinGW-w64 toolchain.

0


source







All Articles