This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: order of switches
- To: Joe Buck <jbuck@synopsys.com>
- Subject: Re: order of switches
- From: Igor Markov <imarkov@cs.ucla.edu>
- Date: Thu, 12 Aug 1999 13:26:35 -0700
- CC: gcc@gcc.gnu.org
- Organization: UCLA, Computer Science
- References: <199908122010.NAA11553@atrus.synopsys.com>
Joe Buck wrote:
>
> > It appears that the order of switches that I give to g++
> > is critical to how it works. It may silently ignore -I or -l
> > if they aren't in the correct place. That seems weird and
> > causes problems, e.g.,
>
> This is a beginner question.
>
> gcc's behavior is the same as that of all Unix C compilers:
well... thank you very much, but I've been working with SunCC
for 3+ years, am now porting to g++ and having problems
(which is why the question arose)
> the order of the switches most definitely matters for include file
> directories and libraries.
yes, that relates to the order, but that *does* seem trivial
(esp. that I am using the Makefiles which work with SunCC)
In one instance I had to move -l after the .o file
so that gcc does not silently ignore -l
In another instance I was bitten by both -Ixxx and -I being
legal (I defined STL="" because g++ has a good STL inside)
oh, well... it looks people like reading 50% of email and
shoot a reply immediately. That's rarely useful.
> > I just grep'ed man g++ for "order" and it there were no matches.
>
> The man pages are very minimal guides to the option flags. The real
> documentation of GCC is in the texinfo files.
I get an impression of that this is some kind of conspiracy (gee !)
.. not sure, but, perhaps, to cause people to buy support ?
(yes, I understand one can look at this from difft angles ... but
once I have my angle, it may be difficult to convince me otherwise)
Igor
--
Igor Markov office: (310) 206-0179
http://vlsicad.cs.ucla.edu/~imarkov