/usr/bin/ld: cannot find -lgstreamer-0.10, plus other missing modules

Mandar Joshi emailmandar at gmail.com
Tue Sep 13 04:17:26 UTC 2016


>
> Command and messages:
> ===================
> gcc -n hello_world.c -o hello_world `pkg-config --cflags --libs
> gstreamer-0.10`
Here is the slightly modified program

#include <gst/gst.h>

int main(int argc, char *argv[]) {
  GstElement *pipeline;
  GstBus *bus;
  GstMessage *msg;

  /* Initialize GStreamer */
  gst_init (&argc, &argv);

  /* Build the pipeline */
  pipeline = gst_parse_launch ("playbin
uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL);

  /* Start playing */
  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* Wait until error or EOS */
  bus = gst_element_get_bus (pipeline);
  msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

  /* Free resources */
  if (msg != NULL)
    gst_message_unref (msg);
  gst_object_unref (bus);
  gst_element_set_state (pipeline, GST_STATE_PLAYING);
  gst_object_unref (pipeline);
  return 0;
}

Compile and Link to gstremaer-1.0
gcc -o gstreamer_one gstreamer_one.c `pkg-config --cflags --libs gstreamer-1.0`

Tested on Fedora 24 amd64.


Regards
Mandar Joshi


More information about the gstreamer-devel mailing list