How to fix: Error: Set HXCPP_MSVC_CUSTOM manually

Error: 64bit is not automatically supported for this version of VC. Set HXCPP_MSVC_CUSTOM and manually configure the executable, library and include paths

I’m trying to evaluate Haxe & OpenFl–not having a ton of success so far.

I have years of experience with AS3 Air captive runtime for Windows using FlashDevelop. I need an alternative (for a while I had hope in Harman).

I have installed HaxeDevelop, Haxe (4.1.1, I found out the hard way OpenFl doesn’t work with 4.2 yet), Lime, OpenFl, and VS Code. I have gotten a couple of the Haxelib OpenFl sample projects to run for debug builds targeting HTML5. Others I gave up on. Pirate Pig is working with HTML5 as the target.

When I try to target Windows, I get the error message listed at the top of this post. I get the same error in other scenarios too.

I’m not very c++/cross-compiling/cross-platform knowledgeable and quite ignorant on web development (I do have a good deal of experience in a K&R version of C for an embedded RTOS, but that was quite a while ago).

So how do I fix my problem?

I’ve searched a lot, and seen the problem posted, but no direct answers.

It kind of looks like a Define, but HXCPP_MSVC_CUSTOM is not listed on:

Nor would my feeble mind know what to do with it if it were shown on that page.

It is listed in
So it probably is a Define, but again that feeble mind problem.

It’s not in the Compiler Usage page:

Can anyone fill me in, or perhaps point me to an article or manual that will help me out?

Thank you.

I think that error message usually appears when you don’t have MSVC installed (the Microsoft C++ compiler that comes with Visual Studio). There is a checkbox you need to check in Visual Studio’s installer to include the C++ stuff.

1 Like

Thank you @Gama11

I can now compile and run the Pirate Pig sample!

For anyone else having the HXCPP_MSVC_CUSTOM error message while to trying to get started, my quick suggestion is to just skip Visual Studio Code (at least for now) and go with Visual Studio Community or some other full IDE version of Visual Studio.

Here is a screenshot of the checkbox mentioned for the install:

Now the longer version explaining why I suggest skipping VS Code, to help you avoid my pitfalls, in case you need convincing.

I had gone with VS Code over VS Community because that is one recommended by (I was using HaxeDevelop, but eventually realized I would need more than just that for creating .EXE output). I had had VS Community installed on my computer before a Windows update crashed both my boot drive and a clone copy of it and forced me to re-build. But I thought VS Code might be the path of least resistance for getting rolling with Haxe. There was probably good reason why it was suggested by

For reference:

OpenFl for Haxelib download:
then here for next step of choosing a code editor:

After reading @Gama11’s comment , I went back and reinstalled VS Code and finally realized that C++ was not installed with it. You have to do two additional steps. You have to enable C++, and you have to find and separately install a C++ compiler. (I took screen shots and would be glad to post if anyone asks–but this didn’t work for me).

VS Code’s C++ enabling window offered a couple links for help installing a C++ compiler.

I checked out this one first, because it had MSVC in parens in the link.

But when scanning through the page (too quickly), it thought it required that an IDE version of Visual Studio, such as Community, already be installed. I didn’t want to possibly mess things up by having two different versions of Visual Studio installed, so I went with this link instead.

That link has steps for using the Minimalist GNU for Windows compiler. I installed and went through the Hello World example, but it didn’t work (duh–it’s not MSVC) when trying to build Pig Pirate under HaxeDevelop.

So I went back to the prior link and read just a tiny bit further down the page and found this: * You can also install just the C++ Build Tools , without a full Visual Studio IDE installation.*


So I went to the indicated download page to download the tools:

But on that page, after I hit the right drop down and found the download button for Build Tools for Visual Studio 2019 it kept kicking me back higher up the page and the only workable option I found was to download a full version of Visual Studio 2019 (Community for me).

So I did that, and installed it, using the check mark indicated above, rebooted the computer as required, and then my build of Pirate Pig in HaxeDevelop worked without ever even launching Visual Studio Community.

So I suppose I could now go back into VS Code (which I did not uninstall) and connect it with MSVC, but why bother right now? I’m just trying to do the most basic stuff for now and it’s already taken me forever and a day. If I decide to go with Haxe and OpenFl, I can look at that later.

Good luck fellow beginners.

Yes, VSCode and regular Visual Studio are completely separate things. You don’t need to skip the former to install the latter.

VSCode is a popular editor for Haxe development, while pretty much the only reason to install regular Visual Studio as a Haxe user is to obtain MSVC. It has no support for editing Haxe code whatsoever.