shared - 如何使用 autoconf 制作 .so 库,而不是 .la 库?

标签 shared autoconf

我想用 autoconf 创建一个共享库。但是,我希望共享库具有“.so”扩展名,而不是以“lib”开头。基本上,我想制作一个加载 dlopen 的插件。 .是否有捷径可寻?

当我尝试使用 autoconf 创建 .so 文件时,出现以下错误:

插件/Makefile.am:3: scan_bulk.la' is not a standard libtool library name plugins/Makefile.am:3: did you mean libscan_bulk.la'?

最佳答案

使用 -module旗帜。它是这样的:

pkglib_LTLIBRARIES = scan_bulk.la
scan_bulk_la_LDFLAGS = -module -avoid-version -shared

模块标志向 Autotools 表明这应该是一个插件。

关于shared - 如何使用 autoconf 制作 .so 库,而不是 .la 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5671681/

相关文章:

C++:如何创建两个相互依赖的共享库?

configuration - 如何禁用Automake文档?

c++ - 我可以从 automake/autoconf 中提取 libtool 配置以供单独使用吗?

version - 是否有 autoconf 宏的版本索引,以便我知道要放入 AC_PREREQ 中的版本?

c# - 我如何更改此代码,以便它改为写入字符串?

ios - iOS/macOS云共享相册中如何给照片附加短数据?

php - 创建没有 cpanel 访问权限的数据库

vb.net - FileSystemWatcher 更新表单上的文本框

autotools - 使用 autoconf 查找自定义包含目录

C++:::ntohs() 在更高的优化级别上失败