libmodbus icon indicating copy to clipboard operation
libmodbus copied to clipboard

How to generate static lib for linux

Open snahmad opened this issue 5 years ago • 2 comments

  • Tell me steps.
  • for any linux platform

snahmad avatar Oct 14 '19 20:10 snahmad

My impression is, that the documentation https://github.com/stephane/libmodbus#installation is good. Have you tried to follow these steps? When using configure on linux, you might need to add "--enable-static --disable-shared" to have the static libs built - but these are standard configure flags, which might not need to be documented explicitly. ./configure --help lists available options.

nwoetzel avatar Nov 11 '19 12:11 nwoetzel

Yeah, this is working for us on Debian 8 or 9 to build a static library instead of a shared library:

$ ./configure --with-pic --enable-static --enable-shared=no

kuhrusty avatar Dec 09 '19 20:12 kuhrusty