This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setting Win32 environment variables in Cygwin


On Thu, 21 Jul 2005, Mark Hadfield wrote:

> Alex Goldman wrote:
> > When I execute a *.bat file containing lines like
> >
> > Set FOO=12345
> >
> > FOO does not show up in the environment of the Cygwin shell. Further,
> > if I execute Win32 programs that access the environment, they can not
> > see FOO either.
>
> [snip]
> You should write bash commands to set the environment variables. You can
> invoke them at the prompt or bundle them in a bash function and invoke that.
> (It's no good putting them in a shell script and processing it with /bin/bash:
> it'll all be forgotten when the subprocess exits.)

But you could "source" the script (using either "source" or ".")...

> [snip]
> By the way, do you really want to *prepend* entries to the LIB and INCLUDE
> environment variables (as opposed to starting from scratch)? If so, you'd
> better make sure the existing variables are in the Windows format expected by
> your compiler. Ending up with INCLUDE set to something like:
>
> C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;/usr/local/include:/usr/include
>
> would not be cool.

Beware of setting LIB -- it may screw up Perl.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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