2017-01-27 2 views
1

MinGW-64-bit의 지침에 따라 옵션 A : MSYS2- 쉘 & MinGW-w64 Win64 Shell에서 Qt 빌드.소스에서 Qt 5.8 빌드 - 알 수없는 명령 줄 옵션 '-C++ 11'

  • 자식 클론 https://github.com/qt/qt5.git
  • wget을 http://download.qt.io/official_releases/qt/5.8/5.8.0/single/qt-everywhere-opensource-src-5.8.0.tar.gz
  • :
    Using built-in specs. 
    COLLECT_GCC=gcc 
    COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/lto-wrapper.exe 
    Target: x86_64-w64-mingw32 
    Configured with: ../gcc-6.3.0/configure 
    --build=x86_64-w64-mingw32 
    --disable-isl-version-check 
    --disable-libstdcxx-debug 
    --disable-libstdcxx-pch 
    --disable-multilib 
    --disable-nls 
    --disable-rpath 
    --disable-symvers 
    --disable-werror 
    --disable-win32-registry 
    --enable-bootstrap 
    --enable-checking=release 
    --enable-fully-dynamic-string 
    --enable-graphite 
    --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada 
    --enable-libatomic 
    --enable-libgomp 
    --enable-libstdcxx-time=yes 
    --enable-lto 
    --enable-shared 
    --enable-static 
    --enable-threads=posix 
    --host=x86_64-w64-mingw32 
    --libexecdir=/mingw64/lib 
    --prefix=/mingw64 
    --target=x86_64-w64-mingw32 
    --with-arch=x86-64 
    --with-bugurl=https://sourceforge.net/projects/msys2 
    --with-gmp=/mingw64 
    --with-gnu-as 
    --with-gnu-ld 
    --with-isl=/mingw64 
    --with-libiconv 
    --with-local-prefix=/mingw64/local 
    --with-mpc=/mingw64 
    --with-mpfr=/mingw64 
    --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include 
    --with-pkgversion='Rev1, Built by MSYS2 project' 
    --with-system-zlib 
    --with-tune=generic 
    Thread model: posix 
    gcc version 6.3.0 (Rev1, Built by MSYS2 project) 
    

    내가 소스 코드

    git clone https://code.qt.io/qt/qt5.git 
    cd qt5 
    perl init-repository 
    git checkout 5.8 
    
    나는 다른 옵션이 알고

    다운로드 : 말한다 -v

    GCC

두 번째 옵션 (아카이브)에서 동일한 문제가 발생했습니다.

모든 필수 구성 요소를 설치 한 후 난은 OpenSSL과 ICU 구축 - 설치를

  • 는/usr//하려면 openssl 지역
  • 는/usr// ICU 지역

그러나 거기에서 지시가에 너무 명확하지 않다. Windows 명령 쉘을 사용하여 일부 환경 변수를 설정하는 것이 명시되어 있습니다. 하지만 나중에 MSYS2 64 비트 쉘을 사용하고 있으므로 아무 효과가 없습니다.

export INCLUDE=/usr/local/icu/include:/usr/local/openssl/include 
export LIB=/usr/local/icu/lib:/usr/local/openssl/lib 
export QMAKESPEC= 
export QTDIR= 
windows2unix() { local pathPcs=() split pathTmp IFS=\;; read -ra split <<< "$*"; for pathTmp in "${split[@],}"; do pathPcs+=("/${pathTmp//+([:\\])//}"); done; echo "${pathPcs[*]}"; }; systemrootP=$(windows2unix "$SYSTEMROOT"); export PATH="$PWD/qtbase/bin:$PWD/gnuwin32/bin:/c/msys64/mingw64/bin:/c/msys64/usr/bin:/c/msys64/usr/local/icu/lib" 
export MAKE_COMMAND= 
./configure -debug-and-release -opensource -confirm-license -platform win32-g++ -developer-build -c++11 -icu -opengl desktop -openssl -plugin-sql-odbc -nomake examples -nomake tests 

구성 스크립트는 시간이 실행되지만 다음 다음과 같은 오류와 함께 중지 : 여기에 내가 무슨 짓을

... 
Creating qmake................................................................................................Done. 
Info: creating stash file C:\msys64\home\asp\qt5\.qmake.stash 
Info: creating super cache file C:\msys64\home\asp\qt5\.qmake.super 
ERROR: Unknown command line option '-c++11'. 

어쩌면 내가 어딘가에 몇 가지 플래그를 설정하는 잊었지만 그 순간을 위해 I 바로 여기 붙어있어. 아무도 계속하는 법을 압니까?

+3

Qt 5.8은 컴파일러에서 C++ 11 지원없이 컴파일되지 않으므로 -C++ 11 플래그가 쓸모 없게됩니다. –

답변

0

나는이 문제를 해결하기 위해 Andrei R.과 이음새의 코멘트에 따라 -C++ 11 플래그를 제거했습니다.

This is the Qt Open Source Edition. 
You have already accepted the terms of the Open Source license. 
Running configuration tests... 
Checking for gold linker... no 
Checking for valid makespec... yes 
Checking for target architecture... x86_64 
Checking for SSE2 instructions... yes 
Checking for SSE3 instructions... yes 
Checking for SSSE3 instructions... yes 
Checking for SSE4.1 instructions... yes 
Checking for SSE4.2 instructions... yes 
Checking for AVX instructions... yes 
Checking for bugfree AVX support in compiler... yes 
Checking for AVX2 instructions... yes 
Checking for AVX512 F instructions... no 
Checking for C++14 support... yes 
Checking for C++1z support... yes 
Checking for compiler defaulting to C++11 or higher... yes 
0

올바른 컴파일러 플래그 -std = C++ 11하지 -C++ 11이어야한다.

어쨌든 GCC 6.x는 암시 적으로 C++ 11을 사용하므로 필요하지 않습니다. 이것은 저자의 answer의 로그에서도 분명합니다.

관련 문제