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


> Specifically, I need to do
> 
> Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH%
> Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit
> 2003\include;%INCLUDE% Set LIB=C:\Program Files\Microsoft Visual Studio
> .NET 2003\Vc7\lib;C:\Program Files\Microsoft Visual C++ Toolkit
> 2003\lib;%LIB%
> 
> So that VC++ will run properly from the command line. Any suggestions?

Since these variables are to be used by a Windows app, it would make most
sense to set them in Windows.  Then they'll be available to all Windows
apps (including others that might start VC++), and also in Cygwin.  In XP,
you can use the so-well-hidden-it's-almost-gone environment variables pane: 
right click on my computer, Properties, Advanced, Environment Variables. 
You may find it easier just to enter them directly into the registry: 
HKCU\Environment for user-specific variables, or
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment for
system-wide variables.

For path variables that you want to use in both Windows and Cygwin, there is
a path conversion problem, as Igor says.  If you're using VC++ and not gcc,
then you can just leave INCLUDE et al. as Windows-format paths.  But if you
want to launch both from Cygwin, then you have a problem, because either
path format (Windows or Cygwin) will be wrong for one of them.  I guess
what's needed is to put the paths into Cygwin format, and write a wrapper
script for VC++, that converts them back to Windows format first. 
Fortunately cygpath(1) can make these conversions for you.

Good luck,
Andrew.



--
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]