[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile with ncurses statically

From: William McBrine
Subject: Re: compile with ncurses statically
Date: Thu, 20 Nov 2003 22:16:22 -0500 (EST)

On Thu, 20 Nov 2003, Thomas Dickey wrote:

> On Thu, 20 Nov 2003 address@hidden wrote:
> > Recently i have been compiling my program the standard way:
> >
> > gcc -o test test.c -lncurses -lform -lmenu
> instead:
>   gcc -o test test.c -lform -lmenu -lncurses
> > ... Or any other suggestions on how to compile it statically.
> You need a static libc as well, of course.  Not all systems provide that.

If you only need _some_ libraries (like ncurses itself) to be statically
linked, you can achieve that by specifying the path explicitly when
linking; e.g.:

 gcc -o test test.c /lib/libncurses.a

The result would be statically linked to ncurses but dynamically linked to

William McBrine <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]