Error: Could not guess MINGW_ROOT

Hi,

I am new to OpenFL and were trying to get it to work for the first time. I have installed haxe, lime and openfl via command prompt, and installed Visual Studio Express 2010 using lime setup windows. But when I try to compile a brand new OpenFL project in Flash Develop targeting c++, I get the error “Error: Could not guess MINGW_ROOT (tried [c:/MinGW]) - please set explicitly”.

Anyone had this problem before? or is there anything I have to configurate?
Thanks.

2 Likes

You may need to reboot your system, or at least the command prompt, after installing Visual Studio C++ Express in order to target Windows C++, have you done this? Did you install the C++ version of Express?

I’ve only installed http://www.mingw.org/ with all gcc compilers and it works :smile:

It looks like you do not need VS, but maybe it compiles better, I don’t know.

1 Like

Thanks for the help,

I got it working by manually copying the mingw folder from the Code::Block IDE I installed some times ago to the directory Flash Develope is guessing (c:/MinGW). Everything is working so far :smiley:

1 Like

If someone really want to compile with mingw:
Add this line in file %HOME%/.hxcpp_config.xml as a child of <section id="vars"> element:

<set name="MINGW_ROOT" value="path/to/mingw" unless="MINGW_ROOT" />

And for you can compile project with mingw like this:

openfl test windows -Dmingw

I’ve just tested it for myself and it works :smile:

Only rebooting the command prompt it works

This is now fixed on the latest HXCPP :slight_smile: