开发者

how do you make a .so library with autoconf, rather that a .la library?

开发者 https://www.devze.com 2023-02-25 10:56 出处:网络
I want to make a shared library with autoconf. However, I want the shared library to have a \".so\" extension and not to begin with \"lib\". Basically, I want to make a plug-in that will get loaded wi

I want to make a shared library with autoconf. However, I want the shared library to have a ".so" extension and not to begin with "lib". Basically, I want to make a plug-in that will get loaded with dlopen. Is there an easy way to do this?

When I try to create the .so file with autoconf, I get this error:

plugins/Makefile.am:3: scan_bulk.la' is not a standard libtool library name plugins/Makefile.am:3: did you meanlibscan_bulk.la'?开发者_运维知识库


Use the -module flag. It goes something like this:

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

The module flag indicates to the Autotools that this is supposed to be a plugin.

0

精彩评论

暂无评论...
验证码 换一张
取 消