Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 20 Jul 2005 18:29:10 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Mark Hadfield cc: cygwin AT cygwin DOT com Subject: Re: setting Win32 environment variables in Cygwin In-Reply-To: Message-ID: References: <9bbd2794050720120434ea1470 AT mail DOT gmail DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT 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/