简体   繁体   English

使用 Cmake 编译 QtGstreamer 时出错,Mingw32 Compiler 附带 QT 5.12.3

[英]Error when compiling QtGstreamer using Cmake and Mingw32 Compiler comes with QT 5.12.3

I was trying to compile the GStreamer wrapper for QT, so I downloaded the 2 packages iam using QT 5.12.3 and Mingw32 7.3.0我试图为 QT 编译 GStreamer 包装器,所以我使用 QT 5.12.3 和 Mingw32 7.3.0 下载了两个包 iam

  1. gstreamer-1.0-devel-mingw-x86-1.16.0.msi gstreamer-1.0-devel-mingw-x86-1.16.0.msi
  2. gstreamer-1.0-mingw-x86-1.16.0.msi gstreamer-1.0-mingw-x86-1.16.0.msi

Then I installed them, and add the bin folder to the system environment so the Cmake can recognize the dependencies needed from the GStreamer when compiling the QtGstreamer, I downloaded the last version of QtGStreamer 1.2.0 and used Cmake to generate the file, I linked all the dependencies which is QT, Boost, and GStreamer.然后我安装了它们,并将bin文件夹添加到系统环境中,以便Cmake在编译QtGstreamer时可以识别GStreamer所需的依赖项,我下载了最新版本的QtGStreamer 1.2.0并使用Cmake生成文件,我链接QT、Boost 和 GStreamer 的所有依赖项。

when I came to the step of mingw32-make I got error on 17% which is当我来到mingw32-make的步骤时,我得到了17% 的错误,这是

In file included from C:/boost_1_69_0/boost/detail/workaround.hpp:8:0,
                 from C:/boost_1_69_0/boost/mpl/aux_/config/workaround.hpp:17,
                 from C:/boost_1_69_0/boost/mpl/aux_/static_cast.hpp:17,
                 from C:/boost_1_69_0/boost/mpl/aux_/value_wknd.hpp:17,
                 from C:/boost_1_69_0/boost/mpl/if.hpp:17,
                 from D:/build/qtgstreamer/qt-gstreamer-master/src/QGlib/type.h:24,
                 from D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\global.h:25,
                 from D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\caps.h:20,
                 from D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\caps.cpp:17:
C:/boost_1_69_0/boost/type_traits/detail/config.hpp:85:69: warning: "__clang_major___WORKAROUND_GUARD" is not defined, evaluates to 0 [-Wundef]
       && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
                                                                     ^
C:/boost_1_69_0/boost/config/workaround.hpp:246:10: note: in definition of macro 'BOOST_WORKAROUND'
        ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
          ^~~~~~
C:/boost_1_69_0/boost/type_traits/detail/config.hpp:85:69: warning: "__clang_major__" is not defined, evaluates to 0 [-Wundef]
       && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
                                                                     ^
C:/boost_1_69_0/boost/config/workaround.hpp:247:9: note: in definition of macro 'BOOST_WORKAROUND'
        (symbol != 0) && (1 % (( (symbol test) ) + 1)))
         ^~~~~~
In file included from D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstbuffer.h:30:0,
                 from D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstpad.h:70,
                 from D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstelement.h:87,
                 from D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstbin.h:27,
                 from D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gst.h:35,
                 from D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\caps.cpp:22:
D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\caps.cpp: In member function 'void QGst::Caps::append(const CapsPtr&)':
D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstminiobject.h:33:65: error: invalid cast from type 'const CapsPtr {aka const QGlib::RefPointer<QGst::Caps>}' to type 'GstMiniObject* {aka _GstMiniObject*}'
 #define GST_MINI_OBJECT_CAST(obj)          ((GstMiniObject*)(obj))
                                                                 ^
D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstcaps.h:35:47: note: in definition of macro 'GST_CAPS_CAST'
 #define GST_CAPS_CAST(obj)        ((GstCaps*)(obj))
                                               ^~~
D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstcaps.h:249:29: note: in expansion of macro 'GST_CAPS'
 #define gst_caps_copy(caps) GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)))
                             ^~~~~~~~
D:/gstreamer/1.0/x86/include/gstreamer-1.0/gst/gstcaps.h:249:61: note: in expansion of macro 'GST_MINI_OBJECT_CAST'
 #define gst_caps_copy(caps) GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)))
                                                             ^~~~~~~~~~~~~~~~~~~~
D:\build\qtgstreamer\qt-gstreamer-master\src\QGst\caps.cpp:57:40: note: in expansion of macro 'gst_caps_copy'
     gst_caps_append(object<GstCaps>(), gst_caps_copy(caps2));
                                        ^~~~~~~~~~~~~
mingw32-make[2]: *** [src\QGst\CMakeFiles\Qt5GStreamer.dir\build.make:137: src/QGst/CMakeFiles/Qt5GStreamer.dir/caps.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:309: src/QGst/CMakeFiles/Qt5GStreamer.dir/all] Error 2
mingw32-make: *** [Makefile:140: all] Error 2

so what is the mistake I did?那么我犯了什么错误?

I don't know if there is anything else needed to clear my Error, please tell me if you need anything to add我不知道是否还有其他需要清除我的错误,请告诉我您是否需要添加任何内容

Update更新

When I configure the Cmake options, I did not add qt5declarative Cmake, I left it empty, after I made searches on this part i found that this part is no longer supported from QT 5.6, I am not sure if the problem is related to this part, but totaly this is eveyrhting I have done so far.当我配置Cmake选项时,我没有添加qt5declarative Cmake,我把它留空,在我搜索这部分后发现QT 5.6不再支持这部分,我不确定问题是否与此有关部分,但这完全是我到目前为止所做的一切。
a screenshot from my cmake GUI来自我的 cmake GUI 的屏幕截图

您应该尝试使用 Gstreamer 1.14.4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM