MSVS won't install for me (I still haven't figured out how to get .NET 3.5 to install on my PC), but the following should be helpful for you.
As part of using the command prompt, I keep a bunch of utilities in a directory that is added to the PATH when I open the prompt. I tend to use a specific shortcut to do it, but you can also set it to work whenever you open a command prompt. (I use the former simply to keep the command shell clean of my modifications when other programs want to open a command shell for their own purposes.)
In my utility directory ("
D:\bin") I keep a file named "
gcc.bat" (among others) which look something like:
1 2
|
@set PATH=C:\MinGW\bin;%PATH%
@gcc %*
|
(Remember that the %* substitution only works on NT-level kernels -- I'm on XP. If you aren't, you'll have to use %1 %2 %3 %4 etc)
That way, at the command prompt, I only need to type "gcc" to invoke the compiler, and the batch script in my utility directory runs to set up the environment needed to use it. Once activated the first time, the GCC's executables are found in the path
before my script, so it isn't needed again. That is, the next time I type "gcc" to invoke the compiler, it doesn't bother with my script but just uses the compiler directly.
You can do the same sort of thing with the microsoft compiler. Keep in mind that this requires you to be careful about what is in your PATH by default when you open a command prompt.
Hope this is helpful.