The order of linking libs and plugins of gstreamer in CMakeLists Android

Ramil Galin leftbyheaven at gmail.com
Wed Feb 21 16:10:20 UTC 2024


Hello!

I am using gstreamer for Android and using cmake to build a project. But
when I try to build gstreamer_android.so I have linkage issues kind of
these:
```
...
ld: error: undefined symbol: gst_codec_utils_aac_get_sample_rate_from_index
>>> referenced by gsttypefindfunctions.c:1259
...
ld: error: undefined symbol: gst_video_dither_method_get_type
>>> referenced by gstvideoconvertscale.c:329
...
```

In my cmakelists the order is the following:
```
set(
GST_PLUGINS
gstcoreelements
gsttypefindfunctions
gstvideorate
gstvideofilter
gstvideofiltersbad
gstvideoconvertscale
gstautodetect
gstvideotestsrc
gstplayback
gstx264
gstvideoparsersbad
gstandroidmedia
gstopengl
gstapp
gstisomp4
gstalaw
gstvpx
)

set(
GST_PlUGIN_LIBS
orc-0.4
gstgl-1.0
graphene-1.0
png16
jpeg
x264
gstapp-1.0
gstvideo-1.0
gstaudio-1.0
gstpbutils-1.0
gsttag-1.0
gstphotography-1.0
gstcontroller-1.0
gstcodecparsers-1.0
gstplay-1.0
gio-2.0
glib-2.0
gobject-2.0
)

set(
GST_LIBS
gstbase-1.0
gstreamer-1.0
gmodule-2.0
gobject-2.0
glib-2.0
ffi
pcre2-8
iconv
intl
z
)

target_link_libraries(
${PROJECT_NAME} PUBLIC
${loglib}
${GLESv2-lib}
EGL
${GST_PLUGINS}
${GST_PLUGIN_LIBS}
${GST_LIBS}
)
```
What should be the correct order of linkage? Do I need to link smth else?
Any help is appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20240221/6d23d048/attachment.htm>


More information about the gstreamer-devel mailing list