mingw32とg ++を使用してWindows上でqt5.7をコンパイルしています。 configure.batを実行している間、私はこのエラーを取得:QMakeに-std = gnu ++ 11コンパイラフラグを追加する
C:\qt-everywhere-opensource-src-5.7.0\configure.bat -prefix C:\Qt-5.7 -skip qttools -skip qtwebchannel -skip qtwebengine -skip qtcharts -skip qtdatavis3d -platform win32-g++
C:\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakebuiltins.cpp: In member function 'QByteArray QMakeEvaluator::getCommandOutput(const QString&) const': C:\qt-everywhere-opensource-src-5.7.0\qtbase/qmake/library/qmakebuiltins.cpp:419:94: error: '_popen' was not declared in this scope + QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
このエラーにつながるコマンドは次のとおりです。また
g++ -c -o qmakebuiltins.o -std=c++11 -DUNICODE -ffunction-sections -g -IC:\qt-everywhere-opensource-src-5.7.0\qtbase/qmake + lot of stuff
、次のコード:
#include <stdio.h>
int main(int argc, char ** argv)
{
FILE * f = popen(argv[ 1 ], "r");
return 0;
}
はコンパイルされません
g++ -std=c++11 mytest.cpp -o mytest
しかしと:
>g++ -std=gnu++11 mytest.cpp -o mytest
そこで問題は、どのように私はのconfigureファイルによってG ++に渡された++ 11をGNUする++ 11 -cオプションを変更することができますか? ありがとう
同様の質問:http://stackoverflow.com/questions/7980499/where-in-qt-creator-do-をi-pass-argumentsコンパイラ – Marcus