4

i want build iconv as static library on my MacOSX i downloaded sources from http://www.gnu.org/software/libiconv/ and tried:

$ ./configure
$ make
$ make install

This process only makes libiconv.dylib, a dynamic library.

How can I build the static library libiconv.a?

SheetJS
  • 22,470
  • 12
  • 65
  • 75
corbands
  • 167
  • 1
  • 11

1 Answers1

4

Run configure as follows:

./configure --enable-static

Then run make and you will see the static library ./lib/.libs/libiconv.a

To find this option, run ./configure --help:

$ ./configure --help | grep static
  --enable-static[=PKGS]  build static libraries [default=no]
SheetJS
  • 22,470
  • 12
  • 65
  • 75
  • Yes. My previous answer `--with-static` was incorrect, so I deleted it. I just tried @Nirk's answer and it works, so I think this should become the accepted answer. – Digital Trauma Oct 25 '13 at 16:59