有很多关于在Linux中为Qt配置.pro文件来运行GStreamer的信息.但是在WINDOWS中做同样的事情看起来很难.我从他们的官方网站下载了Gst并运行了安装程序.现在它在D:\ gstreamer\1.0\x86 ...我找到了试图更改qt .pro文件的人的唯一描述.我做了同样的事情:
INCLUDEPATH += c:/gstreamer/1.0/x86/include \
c:/gstreamer/1.0/x86/include/gstreamer-1.0/gst \
c:/gstreamer/1.0/x86/include/glib-2.0\
c:/gstreamer/1.0/x86/include/glib-2.0/glib \
c:/gstreamer/1.0/x86/lib/glib-2.0/include
LIBS += -Lc:/gstreamer/1.0/x86/lib
CONFIG += c:/gstreamer/1.0/x86/lib/pkgconfig
Run Code Online (Sandbox Code Playgroud)
项目找到,在输入"gst_init("和gstreamer的其他内容时提供帮助,但它给出了错误
未定义的gst_init引用
这是个问题.如何在Windows中连接GStreamer?
#include <QCoreApplication>
#include <gst/gst.h>
int main(int argc, char *argv[])
{
gst_init(NULL,NULL);
//g_print("abc");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
C:/Qt/Qt5.1.1/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug mingw32-make [1]:输入目录'D:/ Projects/AllTests/Qt/build-Console-Desktop_Qt_5_1_1_MinGW_32bit-Debug' g ++ -Wl,-subsystem,console -mthreads -o debug\Console.exe debug/main.o -Lc:/gstreamer/1.0/x86/lib -LC:\ Qt\Qt5.1.1\5.1.1\mingw48_32\lib -lQt5Cored debug/main.o:在函数
main': D:\Projects\AllTests\Qt\build-Console-Desktop_Qt_5_1_1_MinGW_32bit-Debug/../Console/main.cpp:8: undefined reference togst_init'cols2.exe中:错误:ld返回1退出状态Makefile.Debug:77:目标'debug\Console.exe'的配方失败mingw32-make [1]:*[debug\Console.exe]错误1 mingw32-make [1]:离开目录'D:/ Projects/AllTests/Qt/build-Console-Desktop_Qt_5_1_1_MinGW_32bit-Debug'makefile:34:目标'debug'的配方失败mingw32-make:* [debug]错误2 00:20:18:进程«C:\ Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe»完成代码2.