I used this method from the comments of the chosen answer on that thread.
"if Visual Studio is already installed, choose File | New | Project | C++ and you will be prompted to install the necessary components." – jodis
But you can also do this I reckon.
You don't need to re-download the installer for Visual Studio: just go to Add or remove programs -> Visual studio community 2015 -> modify. From there, I clicked languages, Visual C++. Added cl.exe! – user2831602
I had the same problem. My solution was to install Visual Studio 2017 at the default location. C:\Program Files (x86)\Microsoft Visual Studio
As far as I understand it with Version 2017 Microsoft removed the PATH Variable that points to the location of Visual Studio. There was a fix to HXCPP but I think this needs Visual Studio to be installed at the default location https://github.com/HaxeFoundation/hxcpp/commit/e5e5c21dc128e66093cfa1b9c26ebc6f54ad1d10