How do you create a .so library with autoconf, but rather in a .la library?

I want to create a shared library with autoconf. However, I want the shared library to have the extension ".so" and not start with "lib". Basically, I want to create a plugin that will be loaded using dlopen. Is there an easy way to do this?

When I try to create a .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 '?

+5
source share
1 answer

Use the flag -module. This happens something like this:

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

The module flag tells Autotools that it should be a plugin.

+7
source

All Articles