Mail Archives: cygwin/1997/08/01/18:28:25
> Good point Jason about the ld man page. However, we are discuessing gcc
> or g++, not ld.
A difference that makes no difference; see below.
> It is clear that we need to put the main() entry ( in one of the .c or
> .cxx files) as the first of the source file list ( including .o and .c).
> However, the libraries are not 'source files' to g++. Instead, they are
> assigned as 'options' by '-l'. Therefore, it is really the compiler's
> responsibility to add these options to correct position in parameter list
> passed to 'ld' later.
And how on earth is gcc supposed to guess at this? There are times when
what *must* be passed to the loader is this:
file1.o file2.o -lmylib file3.o file4.0 -lotherlib
If gcc can't preserve this ordering, it's fundamentally broken.
Jason
P.S. I'd address you informally, as you did me, but I admit to being
stumped as to whether I should call you Ku, Wei, or both (and in which
order - I've seen your address come with your name in both orders...
:-).
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -