chronosynclastic
chronosynclastic

Reputation: 1675

undefined reference to `gst_riff_create_video_caps'

I'm trying to build a software that uses gstreamer-1.0 and its plugins. I get this error when I try to make using the following g++ command:

g++ vis.cpp -o vis -O3 -D__STDC_CONSTANT_MACROS -std=c++11  -lopencv_highgui -lopencv_imgproc -lopencv_core -lpng -lv4l1 -lv4l2 -ldc1394 -lswscale -lavdevice -lavformat -lavcodec -lswresample -lavutil -lpthread -lbz2 -lz -lc -lrt -llzma -lva -Idependencies/include -Ldependencies/lib `pkg-config --cflags --libs gstreamer-1.0 gstreamer-base-1.0 gstreamer-app-1.0 gstreamer-pbutils-1.0 gtk+-2.0` 

cap_gstreamer.cpp:(.text._ZN23CvVideoWriter_GStreamer4openEPKcid6CvSizeb+0x434): undefined reference to `gst_riff_create_video_caps'
collect2: error: ld returned 1 exit status
make: *** [vis] Error 1

Isn't gst_riff_create_video_caps already in the base plug-in? Or do I have to link another plugin for it?

Upvotes: 1

Views: 1014

Answers (1)

chronosynclastic
chronosynclastic

Reputation: 1675

I solved my problem. Obviously, I had to add -lgstriff-1.0 to the library flags as pointed out here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gstreamer-riff.html

Upvotes: 1

Related Questions