This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: static lib drops objects with side-effects
- From: Elias Athanasopoulos <elathan at phys dot uoa dot gr>
- To: "Wesley W. Terpstra" <wesley at terpstra dot ca>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 10 Feb 2003 19:01:19 +0200
- Subject: Re: static lib drops objects with side-effects
- References: <20030210160304.GA12232@terpstra.ca>
Hello!
On Mon, Feb 10, 2003 at 05:03:04PM +0100, Wesley W. Terpstra wrote:
> g++ main.o libfat.a -o fails
> This will NOT include the static_nut and will fail to print output
>
> This is a bug.
Try this:
% g++ -Wl,--whole-archive libfat.a -Wl,--no-whole-archive main.o -o works
Elias