jpakkane / vscomp

Run Visual Studio compilers from any command prompt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making VS compilers runnable from any shell

Start the x64 dev tools shell and run this command:

python vscomp.py

Then create a new plain command prompt and cd into the same directory. Then run this to verify:

cl-x64 cwrapper.cpp /O2 /osecond.exe

You should have a successfully built second.exe in the current output directory. If yes, the compiler is working.

Bugs

This does not work in MinGW, because it uses an absolute path to the command file which might have spaces (espcially if doing this in your home directory). This could be fixed by smarter handling of the return value of GetCommandLineA.

This script could be updated to work with x86 and arm targets. Not done yet due to laziness. Pull requests welcome.

About

Run Visual Studio compilers from any command prompt

License:Apache License 2.0


Languages

Language:Python 100.0%