[vlc-devel] [PATCH] src: Makefile.am: link to android_support on android

Alexandre Janniaux ajanni at videolabs.io
Thu Feb 13 15:57:29 CET 2020


libvlccore needs functions like newlocale, which are available through
the -landroid_support link flag. As it also depends upon C++ runtime
libraries, especially for operator new and delete, link -lc++abi too.
---
 src/Makefile.am | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index b6c5996837..d5035c5700 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -395,6 +395,12 @@ libvlccore_la_LIBADD = $(LIBS_libvlccore) \
 	$(LTLIBINTL) $(LTLIBICONV) \
 	$(IDN_LIBS) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
 
+if HAVE_ANDROID
+# Android support exports newlocale, but it's written in C++
+# with calls to operator new/delete.
+libvlccore_la_LIBADD += -landroid_support -lc++abi
+endif
+
 if HAVE_WIN32
 libvlccore_la_SOURCES += \
 	win32/dirs.c \
-- 
2.25.0



More information about the vlc-devel mailing list