I'm trying to figure out how to set-up mingw to work with hxcpp. Haxe
version 3.1.3, MingW version from set-up, with the mingw+MSys it wanted.
Getting down to it, haxe wants Visual Studio, even though I have mingw
installed. Is there a way I can specify the default cpp compiler without
mucking around with things? I've looked all over the place and all I
can find is compiling haxe itself with mingw, or a few references to how
hxcpp has support for mingw, but they are all from 2012 or 2009.
I've tried to adapt:
https://groups.google.com/forum/#!msg/haxelang/dj0l8BRxBIY/hc32MonbazQJ <
https://groups.google.com/forum/#%21msg/haxelang/dj0l8BRxBIY/hc32MonbazQJ>
When I add the -D mingw to my hxml (which I wouldn't have to do in the
first place if mingw was detected right) I get about errors of no disk
in the drive... even if I try my mingw path as its root or the bin
folder.
Further searching finds if the drive letter i: exists, mingw throws errors, re-lettering the drive solves that.
THEN I have to define my Windows version as XP because AttachConsole
isn't defined when the system version isn't found (it compiles to Win98,
good lord). In order to do THAT I had to add:
#define WINVER _WIN32_WINNT_WINXP
to \lib\hxcpp\version\include\hxcpp.h
Which will obviously cause the problem to come back compiling for 64-bit
too. On that note, hxcpp always tries to compile -m32, but I can't seem
to find a way to pass the static flags. These are required for mingw to
not dynamically link the gcc libraries when a 64-bit version is
installed. The flags I found here:
https://groups.google.com/forum/#!topic/haxelang/mPiWF4VJS28 <
https://groups.google.com/forum/#%21topic/haxelang/mPiWF4VJS28>
Overall I'm having a hard time getting haxe compiling because there's
very sparse documentation on actual settings. I had to search Google to
find where .hxcpp_config.xml and even basic setting up of hxml files.
There wasn't even a refernce to the manual to find this information.
These pages:
http://old.haxe.org/doc/start/cpphttp://gamehaxe.com/2011/04/05/nme-from-scratch/Are almost useless because there are a million things that seem to go wrong trying to set up mingw.
Putting the required gcc DLLs in my program directory (whether I
compiled with -cpp cpp or -cpp bin, if there is a difference) makes a
Hello World run correctly. A console is still opened, the program is
32-bit, the libraries are dynamically linked, and i still have to edit
an hxcpp header to get it to compile on a platform XP or later.
If I could get any assistance in resolving this, and if the information
was added to the documentation or haxe and hxcpp were updated to make
this easier, it would be greatly appreciated. I am sure many others
would also appreciate this, as it might also make building windows
targets from a Linux environment easier.