Can't export to Windows cl.exe is not recognized as an internal or external command (flashdevelop)
I recently got a new pc and I'm trying to get flashdevelop and haxeflixel running on it.
I install haxe, openfl, flixel, visual studio, everything seems to be installed correctly, I can build my game in Neko, but not for Windows.
I have the most recent flashdevelop, haxe, neko, haxeflixel, I have JRE and Visual Studio 2015 installed. I uninstalled everything and reinstalled, restarted, etc.
It was working on my crummy laptop, and both seem to have the same thing installed.
This is the build output I get:
Running Pre-Build Command Line...
cmd: "C:\HaxeToolkit\haxe/haxelib" run lime build "project.xml" windows -release -Dfdb
export/windows/cpp/haxe/ApplicationMain.hx:80: characters 47-65 : Warning : Use programPath instead
'cl.exe' is not recognized as an internal or external command,
operable program or batch file.
Error: error running cl.exe -Iinclude -nologo -DHX_WINDOWS -D_USING_V140_SDK71 -GR -O2 -Oy- -c -EHs -GS- -arch:SSE "-IC:/Users/User/flixel/hxcpp/3,3,49/include" -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -D_CRT_SECURE_NO_DEPRECATE -D_ALLOW_MSC_VER_MISMATCH -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -wd4996 -MT -Ychxcpp.h -Yllinkb0f64e3ab5344c0106202e359c708b18 "C:/Users/User/Desktop/game/export/windows/cpp/obj/obj/msvc-ncxp/__pch/haxe/hxcpp.cpp" "/FpC:/Users/User/Desktop/game/export/windows/cpp/obj/obj/msvc-ncxp/__pch/haxe/hxcpp.pch" "-FoC:/Users/User/Desktop/game/export/windows/cpp/obj/obj/msvc-ncxp/__pch/haxe/hxcpp.obj"
Build halted with errors.
Fixed it, didn't realize you had to specify to install c++ compiling tools for new versions of visual studio. That did the trick.
Can you explain how to install the c++ compiling tools? i am currently in the same boat as you were.
I believe there is a checkbox for it when you install VS
is this for the newest visual studios,? i wasn't given any options when i ran the command "lime setup windows" and visual c++ 2010 express was installed.
As long as I remember, vs2010 express includes C++ by default.
Maybe for some reason hxcpp fails to find vcvarsall.bat which is essential for cl.exe to work?
@starry-abyss Yep in a way it kinda fails. In the hxcpp library folder, where there's toolchain/msvc-setup.bat, it can be checked if the folder paths it's trying to search is correct. I use HaxeDevelop and it's a fork of FlashDevelop so they work exactly the same and I kinda had a similar issue like yours where it had problems with finding windows.h. I had the SDK actually installed in Program Files(x86)/Microsoft SDKs/Windows/v7.1A but the folder path set in the batch file is only 7.1A: simple name change did the trick.
As for cl.exe not recognized, I ended up with that error when I tried to force hxcpp to use MSVS 2011 (or was it 2008?) for compilation. It used MSVS 2012 by default and it works fine, although of course the Visual C++ libraries for 2008, 2010 and 2012 were installed as well.
Just posted for others who may be having problems like this to see where the issue is.