3

I need to set several environment variables that should be available in cygwin shell.

I tried running "c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64"/vcvars64.bat in ~/.bashrc. Script seems to run but it does not update environment variables.

How can I export variables set in bat file?

michael nesterenko
  • 14,222
  • 25
  • 114
  • 182

1 Answers1

0

Depends upon what you are trying to do. If you want access to those tools within Cygwin you can edit your .bash_profile and update your PATH= to match what vcvars64.bat has. This is how I get access to those tools.

You can also run vcvars64.bat before starting Cygwin by editing your {cygwin dir}/Cygwin.bat (assuming you're starting Cygwin via this file!) to run it before starting bash. This way the DOS environment would be set and Cygwin would pick it up.

AlG
  • 14,697
  • 4
  • 41
  • 54