This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static lib drops objects with side-effects


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]