<p>I use the VS2008 command prompt for builds, TFS access etc. and the cygwin prompt for grep, vi and unix-like tools. Is there any way I can 'import' the vcvars32.bat functionality into the cygwin environment so I can call "tfs checkout" from cygwin itself?</p>

[{'answer_id': 62037, 'author': 'Scott Hanselman', 'author_id': 6380, 'author_profile': 'https://Stackoverflow.com/users/6380', 'pm_score': 5, 'selected': True, 'text': '<p>According to <a href="http://www.cs.ucl.ac.uk/research/vr/Dive/Local/compile.html" rel="noreferrer">this page</a> you need to:</p>\n\n<p>"Depending on your preference, you can either add the variables required for compilation direct to your environment, or use the vcvars32.bat script to set them for you. Note you have to compile from a cygwin bash shell, to use vcvars32, first run a DOS shell, then run vcvars32.bat, then run cygwin.bat from the directory where you installed cygwin. You can speed this up by adding the directory containgin vcvars32 (somewhere under \\Microsoft Visual Studio\\VC98\\bin) and the directory containing cygwin.bat to your path."</p>\n'}, {'answer_id': 168447, 'author': 'Ted', 'author_id': 8965, 'author_profile': 'https://Stackoverflow.com/users/8965', 'pm_score': 3, 'selected': False, 'text': '<p>Here is my sample Cygwin.bat file that configures Visual studio and starts mintty</p>\n\n<pre><code>@echo off\n@REM Select the latest VS Tools\nIF  EXIST %VS100COMNTOOLS% (\n    CALL "%VS100COMNTOOLS%\\vsvars32.bat"\n    GOTO :start_term\n)\n\nIF  EXIST %VS90COMNTOOLS% (\n    CALL "%VS90COMNTOOLS%\\vsvars32.bat"\n    GOTO :start_term\n)\n\nIF  EXIST %VS80COMNTOOLS% (\n    CALL "%VS80COMNTOOLS%\\vsvars32.bat"\n    GOTO :start_term\n)\n\n:start_term\n\nC:\nchdir C:\\cygwin\\bin\nSTART mintty.exe -i /Cygwin-Terminal.ico -\n</code></pre>\n'}, {'answer_id': 3260273, 'author': 'Nathan Monteleone', 'author_id': 27130, 'author_profile': 'https://Stackoverflow.com/users/27130', 'pm_score': 1, 'selected': False, 'text': '<p>witkamp\'s answer works for vs2005 -- for vs2008, use </p>\n\n<p>CALL "C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\vcvarsall.bat"</p>\n'}]
['https://Stackoverflow.com/questions/62029', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/45603/']