我试图为QT编译GStreamer包装器,所以我使用QT 5.12.3和Mingw32 7.3.0下载了两个软件包iam
1-gstreamer-1.0-devel-mingw-x86-1.16.0.msi
2-gstreamer-1.0-mingw-x86-1.16.0.msi
然后安装它们,并将bin文件夹添加到系统环境中,以便Cmake可以在编译QtGstreamer时识别GStreamer所需的依赖关系,我下载了最新版本的QtGStreamer 1.2.0,并使用Cmake生成了文件, QT,Boost和GStreamer的所有依赖项
当我执行 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
那我犯了什么错误?
我不知道是否还需要清除我的错误,请告诉我是否需要添加
更新
当我配置Cmake选项时,没有添加qt5declarative Cmake,我将其留空,在对该部分进行搜索后,我发现该部分不再受QT 5.6支持,我不确定问题是否与此相关部分,但总的来说,这是我到目前为止所做的一切。
我的cmake GUI的屏幕截图
预先感谢。
答案 0 :(得分:-1)
您应该尝试使用Gstreamer 1.14.4