This should be easy, but I can't figure it out. I want to set up path / include path for the Visual Studio c++ compiler. I have the foo.ps1 script:
& "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvarsall.bat"
and enter .\foo.ps1. It doesn't seem to be working. How do I know? I say $env:include -- it returns nothing. And also, if I say cl (that's the c++ compiler), I get ... not recognized ...
Yes, out of desperation I said 'set-executionpolicy unrestricted', and yes, I'm running PS as administrator. I also tried dot sourcing: . .\foo.ps1. Also tried to type the .....vcvarsall.bat bit from the command prompt. It doesn't complain, but has no effect. Needless to say, the .bat file works like a charm when run from the traditional console.
Can you help? Thanks much.