[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc linking question
Thanks, that was great advice, it worked.
----- Original Message -----
From: "Steven Pritchard" <steve@silug.org>
To: <luci-discuss@luci.org>
Sent: Monday, March 05, 2007 1:47 PM
Subject: Re: gcc linking question
> On Mon, Mar 05, 2007 at 12:26:13PM -0600, Duane Cox wrote:
> > I want to compile logrotate with the static library libpopt.a and not
> > dynamically linked to libpopt.so
> >
> > Currently ldd does show that by default it dynamically links, how can
> > I change this behaviour?
> >
> > I want to keep the dynamic linking to the other libraries, I just want
> > to change libpopt
>
> I think there are at least a couple of ways to do this...
>
> 1) Replace -lpopt in the link line in the Makefile with the path to
> libpopt.a.
> 2) Change the link line to something like this:
>
> gcc [options] -static -lpopt -dynamic -lc
>
> or maybe this:
>
> gcc [options] -Wl,-Bstatic -lpopt -Wl,-Bdynamic -lc
>
> or possibly some other variation. :-)
>
> Steve
> --
> steve@silug.org | Southern Illinois Linux Users Group
> (618)398-3000 | See web site for meeting details.
> Steven Pritchard | http://www.silug.org/
>
> -
> To unsubscribe, send email to majordomo@luci.org with
> "unsubscribe luci-discuss" in the body.
>
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.