How to get GCC for Qt 5.9.5?
-
Hello, I am trying to build an open-source in windows 10.
During do it, I ran into a build issue. Please, give me an advice.the open source is "qt-gstreamer" which is deprecated project.
- The link is below
https://github.com/GStreamer/qt-gstreamer
And I am using MinGW32 with Qt 5.9.5, error log is below.
"AutoMoc subprocess error" :/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32/bits/c++config.:223: Parse error at "__cxx11" // c++config.h 223: #if _GLIBCXX_USE_CXX11_ABI namespace std { inline namespace __cxx11 __attribute__((__abi_tag__ ("Cxx11"))) { } }
I guess it is occured because of miss-matching between gcc and moc.
In my Qt 5.9.5, the "moc.exe" is in mingw53_32 directory. I don't know what the 53 means though. Anyway so I wanna get new gcc relative with mingw53_32 or get new qt tools for mingw32. It seems easy to do the former rather than the latter.
So.. How do you think about my opinion. If you agree I want to get the download link for the gcc, if you don't I want to get your opinion. - The link is below
-
Hi,
There's a coherence issue here: you mention 5.9.5 but your shows 6.3.0.
Are you sure you are using the correct version of Qt ?
-
@SGaist I think the 6.3.0 is mingw version, not qt version. I realized mingw53_32 is in qt 5.9.5 already. But still working on it. why mingw53_32 is separated in two directories? There are C:\Qt\5.9.5\Tools\mingw530_32 and C:\Qt\5.9.5\mingw53_32. As the contents inside, former looks like MinGW side, and Latter looks like Qt side.
-
C:\Qt\5.9.5\mingw53_32
This means that you have a 32 bit Qt version built with MinGW5.3. The subfolder name indicates which compiler was used as well as the architecture of the build.
The compiler is located under Tools.
-
@hslee_6560 How did you install Qt? The Qt installer and Qt maintenance tool both give you the possibility to install MinGW.
-
@Jleon said in How to get GCC for Qt 5.9.5?:
I've met the same problem
Not really. Problem in this thread was witn MinGW build on Windows.
You have a problem with Android.
Please explain exactly what you're doing and what the problem you have.GStreamer on Android: https://doc.qt.io/qt-5/platform-notes-gstreamer-on-android.html
-
I build a qgc project on the windows with qt version 5.15.2 , Android setting:jdk-11,sdk version 9.0 and ndk-verison 21.3.6528147. Before importing gstreamer, it work well. After downloading gstreamer-1.0-android-universal-1.18.6, and change the GST_ROOT at VideoReceiver.pri. I run the program in the abi of arm64-v8a, I get the following error.
:/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32/bits/c++config.:223: Parse error at "__cxx11" make: *** [Makefile:128648: arm64-v8a\moc_gstqsgtexture.cpp] Error 1 make: *** Waiting for unfinished jobs.... :/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32/bits/c++config.:223: Parse error at "__cxx11" make: *** [Makefile:129061: arm64-v8a\moc_qtwindow.cpp] Error 1 :/MinGW/lib/gcc/mingw32/6.3.0/include/c++/mingw32/bits/c++config.:223: Parse error at "__cxx11" make: *** [Makefile:129457: arm64-v8a\moc_qtitem.cpp] Error 1 10:21:56: The process "D:\Android\sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\make.exe" exited with code 2. Error while building/deploying project qgroundcontrol (kit: Android Qt 5.15.2 Clang Multi-Abi) When executing step "Make"
Should I modify the document of gradle?
-
Alright the first error is AVD start error, but I thought it's irrelevant. Well my setting is the belowing:
else : android-clang { CONFIG += AndroidBuild MobileBuild DEFINES += __android__ DEFINES += __STDC_LIMIT_MACROS DEFINES += QGC_ENABLE_BLUETOOTH DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED QMAKE_CXXFLAGS_WARN_ON += -Werror \ -Wno-unused-parameter \ # gst_plugins-good has these errors -Wno-implicit-fallthrough \ # gst_plugins-good has these errors -Wno-unused-command-line-argument \ # from somewhere in Qt generated build files -Wno-parentheses-equality # android gstreamer header files }
I was not sure why did mingw32 in there.
-
I found the answer.
Go to the file:C:\MinGW\lib\gcc\mingw32\6.3.0\include\c++\mingw32\bits\c++config.h
And modify the code#define _GLIBCXX_USE_CXX11_ABI 0
from 1 to 0
But I don't think it is the best solution, it might destroy some structure.
What flags should I use in .pro to make sure the file got to know it defines to zero?