Win XP support in hxcpp

147 views
Skip to first unread message

Tarler

unread,
May 6, 2015, 2:31:14 AM5/6/15
to haxe...@googlegroups.com
Hi,

I have a simple console app which is working well on Windows 8 and OS X, when I compile it on those platforms. (Thank you hxcpp people).

It doesn't seem to work on Windows XP (32 bit). Do I explicitly need to set XP compatibility when I compile it? (Is it possible to set that configuration within FlashDevelop?)

I've seen various posts in various places which suggest this may be the case but I've not been able to put it together yet.

Thanks,
James


underscorediscovery

unread,
May 6, 2015, 10:47:22 PM5/6/15
to haxe...@googlegroups.com
Supposedly in a more recent version, it should default to xp compat for 32 bit builds: 
https://github.com/HaxeFoundation/hxcpp/pull/196

You could try explicitly setting the flag to hxcpp, by defining HXCPP_WINXP_COMPAT manually for hxcpp.
That depends on your build platform, i.e if you're using openfl it would go inside the openfl project as a <haxedef name="HXCPP_WINXP_COMPAT" value="1">
node iirc.

Perhaps Hugh has changed something since, though, I stand to be corrected.

Tarler

unread,
May 7, 2015, 4:47:53 AM5/7/15
to haxe...@googlegroups.com
Thanks for your reply, Sven. I had already tried adding that to the compiler directives in FlashDevelop. The resulting commands looked like this:

haxe  -cp src -cpp C:/Users/James/Documents/myproject/bin -D HXCPP_WINXP_COMPAT -main Example

haxelib run hxcpp
Build.xml haxe -DHXCPP_WINXP_COMPAT="1" -Dhaxe3="1" -Dhaxe_ver="3.103" -Dhxcpp_api_level="311" -I"src/" -I"C:\\HaxeToolkit\\haxe\\extraLibs/" -I"" -I"C:\\HaxeToolkit\\haxe\\std/cpp/_std/" -I"C:\\HaxeToolkit\\haxe\\std/"


But no joy. The app is still crashing immediately on launch on XP with a "Your app has encountered a problem and needs to close" message. 

The corresponding Windows error event contains the following

Faulting application example.exe, version 0.0.0.0, faulting module neko.dll, version 0.0.0.0, fault address 0x00014780.

If I find anything else out, I'll update this post.

Cheers,
James

Hugh

unread,
May 8, 2015, 12:32:35 AM5/8/15
to haxe...@googlegroups.com
I am not sure what neko.dll is doing in there - looks like it had trouble finding some of the std libraries that ship with hxcpp, and should be included in your application.  Or maybe it found them but rejected them because it could not load them.  What version of hxcpp are you using?

Try setting the environment variable HXCPP_LOAD_DEBUG on the target machine and see if you get any extra interesting information.

Hugh

Tarler

unread,
May 11, 2015, 5:42:24 AM5/11/15
to haxe...@googlegroups.com
Thanks for your help, Hugh.

I tested it with a simple "Hello World" application and it showed the error:
Error : Could not load module std@sys_sleep__1

If I copied the std.dll to the same folder as the exe, it all works fine, and the same for my slightly more involved app. So all done. Ideally, I would work out how to configure my FlashDevelop project file to bundle the .dll into the final .exe, but it's not a big deal.

Cheers,
James
Reply all
Reply to author
Forward
0 new messages