Follow-up: Problem with executing demo code with static linked library

Javad Rahimi javad321javad at gmail.com
Fri Aug 19 12:23:03 UTC 2022


Hi Tim
Thanks a lot.

On Fri, Aug 19, 2022 at 4:39 PM Tim-Philipp Müller via gstreamer-devel <
gstreamer-devel at lists.freedesktop.org> wrote:

> Hi Javad,
>
> > Isn't there anyone in this group who knows how to compile an
> > application with Gstreamer with static mode? Even its developers?
>
> It's not really possible to diagnose build issues remotely without
> detailed information what you're doing and have done.
>
I followed the instruction provided on the official page:
https://gitlab.freedesktop.org/gstreamer/gstreamer#static-build
I build statically with:

> meson --default-library=static -Dgst-full-libraries=app,video builddir

ninja -C builddir
>
Then I  tried to build the demo code with:
https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
With the following instructions:

gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs
gstreamer-1.0`
I also tried:

> gcc basic-tutorial-1.c -o basic-tutorial-1 `pkg-config --cflags --libs
> gstreamer-1.0` -Bstatic -L./-l:libgstreamer-full-1.0.a


But nothing changed.


>


> Perhaps you could provide the exact steps you have taken to build
> GStreamer and your application, and which branch, then someone might
> spot the problem.
>
> It sounds like you may not have included any plugins or at least not
> the playbin plugin, or they're not getting initialised automatically.
>
> Best regards
>  Tim
>

Kind regards,
Javad

>
> > > > I have followed the instruction in Gstreamer GitHub page to
> > > > compile it in static mode. The "libgstreamer-full-1.0.a" is made
> > > > and the demo code
> > > > in https://gstreamer.freedesktop.org/documentation/tutorials/basi
> > > > c/hello-world.html?gi-language=c is also compiled and linked
> > > > successfully. However when trying to run it. It show following
> > > > error. But when Compiling in shared library mode, it works
> > > > perfectly.
> > > > > 0:00:00.034195340  7699 0x56525f9e8500 ERROR
> > > > > GST_PIPELINE
> > > > > subprojects/gstreamer/gst/parse/grammar.y:851:priv_gst_parse_yy
> > > > > parse: no element "playbin"
> > > > >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220819/2102b876/attachment.htm>


More information about the gstreamer-devel mailing list