public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Add search path to the cygwin.
@ 2000-10-17 10:42 Fu, Jack
  2000-10-17 12:01 ` mike corbeil ordinary user account
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Fu, Jack @ 2000-10-17 10:42 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Hi all:

Can anyone tell me how to add search path to the cygwin bash shell?  I tried
to use gcc to compile a simple program and it is looking for some header
files.  I tried to add path using $ $PATH=/cygnus/include:$PATH.  What is
the correct command?

Thanks
Jack

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: Add search path to the cygwin.
@ 2000-10-18  2:47 David Korn
  2000-10-18  8:00 ` mike corbeil ordinary user account
  0 siblings, 1 reply; 14+ messages in thread
From: David Korn @ 2000-10-18  2:47 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

>"Fu, Jack" wrote:
>>
>> I tried to add path using $ $PATH=/cygnus/include:$PATH.

>From: mike corbeil ordinary user account [ mailto:mcorbeil@NetRevolution.com ]

>      $PATH=/cygnus/include:$PATH
>      export PATH
>
>      or
>
>      $PATH=$PATH:/cygnus/include
>      export PATH

  PMFBI, but.... surely you mean

       PATH=/cygnus/include:$PATH
       export PATH

 because if you put that first $ sign there, it expands the path, rather
than treating it as a variable name, so if (for example) your path used to
be /usr/bin:/bin, then what you've just typed to bash (after expansion) is

   /usr/bin:/bin=/cygnus/include:/usr/bin:/bin

which of course doesn't make a lot of sense to bash...

    hth,
        DaveK
-- 
 "The secret of life is honesty and fair dealing. If you can fake that,
you've got it made." -Groucho Marx

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: Add search path to the cygwin.
@ 2000-10-18  9:27 David Korn
  2000-10-19 13:53 ` mike corbeil ordinary user account
  0 siblings, 1 reply; 14+ messages in thread
From: David Korn @ 2000-10-18  9:27 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

     Hi Mike,

>I ooops'd, and what's worse is that I even reviewed what I wrote.  I've
>been looking at the screen for too many hours, too many nights and
>days.  The eyes go "fuzzy", seeing whitespace instead of $.

  I know just what you mean. Even worse than seeing whitespace for your
prompt is when your eyes start seeing what you *meant* to type instead of
what you actually did. :-O

>Serves as possibly a good little tutorial for the person I was
>responding to.  I never programmed or worked in Unix before learning how
>to do so and have always had books at hand for reference, for what ever
>I was doing, including yours for ksh work.

  I had better point out, for the benefit of the list, that I am no relation
to *that* David Korn. This means that when I try the ego-boosting trick of
searching for my own name on the web I am generally disappointed!

>Sorry for the error.

  No need to apologize. When even an old hand like Alexandre seemed not to
have spotted it (or to have passed over without commenting) I thought I'd
just mention it for the sake of completeness.

   regards,
      DaveK

-- 
 "The secret of life is honesty and fair dealing. If you can fake that,
you've got it made." -Groucho Marx

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: Add search path to the cygwin.
@ 2000-10-20  8:21 David Korn
  2000-10-20 13:40 ` mike corbeil ordinary user account
  0 siblings, 1 reply; 14+ messages in thread
From: David Korn @ 2000-10-20  8:21 UTC (permalink / raw)
  To: 'mike corbeil ordinary user account'
  Cc: 'gcc-help@gcc.gnu.org'

>From: mike corbeil ordinary user account [ mailto:mcorbeil@NetRevolution.com ]
>Sent: 19 October 2000 21:49

>Well done and it's better that way.  If a person was new to Unix, or
>Linux, which ever was being used, and didn't have a decent book to refer
>to, then what I had written could certainly be a "byte" of a pain or
>nuissance.

 Even after several years of experience I still find myself struggling
to remember which shell is which, and whether subshells will inherit my
variables, and which syntax to use for loops, and... and ... and ...
 The power and variety of the Unix shells is a double-edged sword!

>Using PATH for this seemed strange and I've no idea if it'd even work
>(if it's stated in the book on make or the man page, then I don't
>remember this part). I've only used PATH for executables.
>
>Can PATH, or $PATH, actually be used to specify where include files are
>located?

  Not by default, at any rate as far as gcc is concerned. It's an
unlikely thing for any compiler to implement - since there is no
interchangeability between .h files and executables, there's no sense in
only using one environment variable to point to both. OTOH it *could*
be done - you could use a string substitution in the makefile to replace
all the colons between the $PATH components with space, -I, space, and
then prefix that with -I and add it to the compiler CFLAGS. But I've
never seen it done and I can't see any good reason to blur the meaning
of $PATH.

>>  "The secret of life is honesty and fair dealing. If you can fake that,
>> you've got it made." -Groucho Marx
>
>Business philosopher as well as good comedian, eh.  I haven't seen any
>of his material in years, but only remember a good comic.

 And a Discordian saint, too!

           DaveK
-- 
 "The secret of life is honesty and fair dealing. If you can fake that,
you've got it made." -Groucho Marx

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2000-10-20 13:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-17 10:42 Add search path to the cygwin Fu, Jack
2000-10-17 12:01 ` mike corbeil ordinary user account
2000-10-17 12:19 ` Question re. FSF GNU SmallEiffel vs. C and C++ mike corbeil ordinary user account
2000-10-18  0:55   ` Alexandre Oliva
2000-10-18  7:38     ` mike corbeil ordinary user account
2000-10-18 19:29       ` Saran
2000-10-19 12:14         ` mike corbeil ordinary user account
2000-10-18  0:57 ` Add search path to the cygwin Alexandre Oliva
2000-10-18  2:47 David Korn
2000-10-18  8:00 ` mike corbeil ordinary user account
2000-10-18  9:27 David Korn
2000-10-19 13:53 ` mike corbeil ordinary user account
2000-10-20  8:21 David Korn
2000-10-20 13:40 ` mike corbeil ordinary user account

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).