[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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
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. :-)
email@example.com | 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 firstname.lastname@example.org with
"unsubscribe luci-discuss" in the body.