Change hxcpp compiling to android-9 and use newer versions?

  • I'm not sure if making a new thread is the best idea for this since @poker158149 ultimately first put the issue here, but is it possible to change the compiling target of hxcpp from android-9 to any newer version?

    From poker's thread I have said that for some reason, after opening a demo project (Multitouch) I have received the same error as he had, and at first I thought a name change sufficed but then I realized the target was wrong, since android-9 is too old to be compatible with OpenFL/Lime anyway since the Android NDK r12b is the latest version. It's very odd since I succeeded in compiling Flixius, but now I can't do that either: the same error has crossed over.

    I looked at Github and it seems as if Lime's .ndll library has to be recompiled, since in Build.xml android-9 is already set. I will try if editing one of the project .hx files with PLATFORM variable as set would work when replaced with, say, android-18, but I can't be sure either. Is there a way that this can be done without rebuilding any parts of hxcpp?

    EDIT: I've tried the basic <android> tag for minimum-sdk-version and target-sdk-version (18 and 23 respectively). At first it worked on Flixius but the Multitouch project seemed to have ruined everything. Forgot to mention, thanks @dean

  • @rknonchalance

    I think you can add this to project.xml with the target you want.

    <android target-sdk-version="19" />

    EDIT: I should have read it more carefully. I think you already know this.

  • Sadly yeah, it can't seem to override android-9. When I tried HF last year, I did this too and it doesn't work by default. I had to edit a couple of .hx files to hxcpp directly (I think) but now I can't recall what I exactly changed back then to make things work this time around. I found a couple of references to android-9 and I've replaced them but it still doesn't work. I'm missing something critical that I can't think about.

  • @rknonchalance

    Did you update the NDK path in .hxcpp_config.xml?

  • I was unable to fix the error, but I figured out the actual cause although I don't know what next step I should take. Basically what seems to happen is that hxcpp tries to compile the Android project under GNU Linux (gcc++) since upon reaching hxcpp.hx (as in poker's case I think) it skips the #if defined MSVC_VER compiler statement, and because of this it required stddef.h instead, which isn't given by default on the NDK in the latest r12b version. But I was able to compile through Flixius before this, and from what I recall it pointed to a different directory, the one where I initially encountered the error that the folder name should be 4.9 and not 4.9.x and a missing libgcc.a file. It was set to compile through MSVC++ instead.

    Now exactly what I've done that led to hxcpp thinking it has no MSVC version defined. I run VS2013 Ultimate Update 5 to do ASP.NET pages wuth Razor from time to time, but that's it. By any chance am I possibly just missing an environment variable aside from say VS2012TOOLS?

  • @dean The NDK path is correct in hxcpp_config.xml (my directory is at S:/Android NDK), but when I compiled with HXCPP_VERBOSE it assumes the library is r8 when it's in fact r12b (it can't find detect the correct version number, and I've tried setting environment variables to 12 but so far I've failed - maybe I simply am typing it wrong?)

  • @rknonchalance

    what versions of flixel, hxcpp, lime, openfl are you using?
    This is what I'm using.

    flixel: 4.0.1
    hxcpp: 3.3.49
    lime: 2.9.1
    openfl: 3.6.1

    If you have the latest versions, some things won't work. Other than that, I'm sorry, I don't know. Maybe try the openfl forums.

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.