www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/07/01/12:09:43

Date: Wed, 1 Jul 92 11:10:24 EDT
From: DJ Delorie <dj AT ctron DOT com>
To: greve AT rs1 DOT thch DOT uni-bonn DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Complex -- compiler bug?

The problem with Complex and libm.a is that gcc, by default, links libgcc.a
*after* libm.a, not *before*.  Try this:

	gcc myprog.o -lgcc -lm

In Unix, you're expected to do this, I think:

	gcc myprog.o -lg++ -lm

Since the C++ stuff is in libgcc.a, and libgcc.a gets linked in
automatically, nobody thinks of this.  Gcc just doesn't expect the
native libraries to understand C++.

Maybe I should move the libm.a routines into libc.a?

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019