简体   繁体   中英

GStreamer linker error LNK2019 and LNK2001 in Qt C++

I'm having some trouble correctly linking the gstreamer library in qmake.

So, I have library I wrote which uses gstreamer, I added this lines to the .pro file:

INCLUDEPATH += ../OtherLibs/GStreamer/Include
INCLUDEPATH += ../OtherLibs/GStreamer/Include/glib-2.0
INCLUDEPATH += ../OtherLibs/GStreamer/Include/libxml2
LIBS += -L../OtherLibs/GStreamer/Lib -lgobject-2.0 -lgstreamer-0.10 -lglib-2.0 -lgstapp-0.10

I run qmake and then compile and I don't get any error messages at all.

I use this library in another Qt project and I get:

WTAV.lib(contentvideo.obj):-1: error: LNK2019: unresolved external symbol g_assertion_message_expr referenced in function "protected: void __cdecl ContentVideo::load(class QString)" (?load@ContentVideo@@IEAAXVQString@@@Z)

and

WTAV.lib(mediapipeline.obj):-1: error: LNK2001: unresolved external symbol g_assertion_message_expr

I know that the paths to the headers and libs are correct because I get compile errors like "gst/gst.h not found" when I change them.

I have no idea what I might be doing wrong, maybe someone can point me in the right direction.

Thanks in advance.

SOLVED:

I was compiling the project with a 64bit compiler and using the 32bit gstreamer SDK... Thank you Pavel Krasavin for pointing out that it could be the problem.

g_assertion_message_expr() is exported by libglib-2.0.so. You should check this library is available at your path ( -L../OtherLibs/GStreamer/Lib ). Also, check this library has the same architecture as your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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