This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: order of switches


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

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