0

ビルドをAppveyorに渡そうとしていますが、コンパイルの問題に直面しています。

次の単純なQtプロジェクトがあるとします。

// ConsoleTest.pro
QT += core
QT -= gui

TARGET = ConsoleTest02
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

CONFIG += c++11

そしてソースコード:

// main.cpp
#include <QCoreApplication>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    return a.exec();
}

次のエラーがあります。

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 ../../Qt/5.4/mingw491_32/include/QtCore/qglobal.h:81,
             from ../../Qt/5.4/mingw491_32/include/QtCore/qcoreapplication.h:37,
             from ../../Qt/5.4/mingw491_32/include/QtCore/QCoreApplication:1,
             from ConsoleTest02/main.cpp:1:
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)); }
                              ^

ConsoleTest.proから次の行を削除すると、エラーが消えます。

CONFIG += c++11

MinGW 4.9.1 32 ビットでQt 5.4を使用しています。

何か案が?

4

0 に答える 0