Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build ncurses statically

Tags:

ncurses

Since Arch Linux does not provide any static libraries for ncurses, I need to make it myself. However, I don't see any option in the configure script that says anything about static linking. How do I make a static ncurses library?

like image 751
Melab Avatar asked Sep 08 '25 03:09

Melab


1 Answers

It's in configure but it's well-hidden:

Options to Specify the Libraries Built/Used:
  --disable-libtool-version  enable to use libtool's incompatible naming scheme
  --with-libtool          generate libraries with libtool
  --with-shared           generate shared-libraries
  --with-normal           generate normal-libraries (default)
  --with-debug            generate debug-libraries (default)

I suppose ncurses is old enough that static libraries are "normal" and shared libraries are the new hotness! Anyhow, if you build with defaults, or explicitly specify --with-normal, you should get static libraries (libncurses.a, libpath.a, etc.).

like image 152
Rich Lafferty Avatar answered Sep 11 '25 00:09

Rich Lafferty