问题描述
有没有一种我可以配置构建ffmpeg的共享库的Android,没有版本号后缀?我可以使用不同的选项构建,但总是得到像libavcodec.so.57这样的文件。我需要没有后缀的库,如libavcodec.so。我认为选项--disable-symver会做这个伎俩,但遗憾的是没有。问题是我有一个库(.so文件),依赖于没有后缀的ffmpeg共享库,因此无法加载这些im。i主要遵循的说明
提问有助于永远找到答案。这就是为什么我是成功的,挖掘文件帮助。执行以下操作:
- 运行您的配置
- 找到config.mak
-
更改
SLIBNAME_WITH_VERSION = $(SLIBNAME)$(LIBVERSION)
SLIBNAME_WITH_MAJOR = $(SLIBNAME) LIBMAJOR)
to:
SLIBNAME_WITH_VERSION = $(SLIBNAME)
SLIBNAME_WITH_MAJOR = $ (SLIBNAME) -
更改
SLIB_INSTALL_NAME = $(SLIBNAME_WITH_VERSION)
SLIB_INSTALL_LINKS = $ (SLIBNAME_WITH_MAJOR)$(SLIBNAME)
至:
SLIB_INSTALL_NAME = $(SLIBNAME)
SLIB_INSTALL_LINKS = -
运行make或make -j $(nproc)
-
make install
现在,您将拥有没有后缀的共享库。
你可以检查它们的依赖项
readelf -d somefile.so
is there a way i can configure to build ffmpeg shared libraries for android without version number suffixes? im able to build with different options but always get files like "libavcodec.so.57". i would need the libraries without suffixes like "libavcodec.so". i thought the option "--disable-symver" would do the trick but unfortunately it didn't. the problem is that i have a library (.so file) that depends on ffmpeg shared libraries without suffixes and therefore can't load those im getting built.i have followed mostly the instructions here.
asking questions leads always to finding answers. that's why i was successful, digging into the make files helped. do the following:
- run your configuration
- find "config.mak"
change
SLIBNAME_WITH_VERSION=$(SLIBNAME).$(LIBVERSION)SLIBNAME_WITH_MAJOR=$(SLIBNAME).$(LIBMAJOR)
to:
SLIBNAME_WITH_VERSION=$(SLIBNAME)
SLIBNAME_WITH_MAJOR=$(SLIBNAME)change
SLIB_INSTALL_NAME=$(SLIBNAME_WITH_VERSION)SLIB_INSTALL_LINKS=$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
to:
SLIB_INSTALL_NAME=$(SLIBNAME)
SLIB_INSTALL_LINKS=run "make" or "make -j$(nproc)"
"make install"
now you will have shared libraries without suffixes.
you can check their dependencies by"readelf -d somefile.so"
这篇关于如何构建没有版本后缀的ffmpeg共享库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!