Can not compile for android (HaxeDevelop)

  • I have been trying to compile for android (other tested targets windows and HTML5 work) but i keep getting this:

    Error: While running :arm-linux-androideabi-g++ -IC:/Users/JRP/Desktop/ProjectHex/export/android/obj/obj/android-debug-v7/__pch/haxe -Iinclude --sysroot=d:\programming\android-ndk/platforms/android-9/arch-arm -Id:\programming\android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include -Id:\programming\android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/libs/armeabi/include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=330 -ID:/Programming/HaxeTools/haxe/lib/hxcpp/3,3,49/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums "-D_LINUX_STDDEF_H " -Wno-psabi -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=9 -Wa,--noexecstack -O0 -g -DNDEBUG -c -x c++ -Wno-invalid-offsetof -frtti ./src/haxe/ds/ObjectMap.cpp -oC:/Users/JRP/Desktop/ProjectHex/export/android/obj/obj/android-debug-v7/430666c1_ObjectMap.obj
    ./src/haxe/ds/ObjectMap.cpp:37: error: address of overloaded function with no contextual type information
    ./src/haxe/ds/ObjectMap.cpp:39: error: too many initializers for 'haxe::IMap_obj'
    Build halted with errors.

    I have completely reinstalled haxe+openfl and ran lime setup android, and should have everything required.

    Any ideas? I remember it compiling just fine in the past with older versions (of haxe and haxeflixel)

  • administrators

    You're on Haxe 3.3.0-rc.1 right? Try downgrading to 3.2.0, this could well be a hxcpp regression.

  • Hi,

    On my machine compiling for android works. I have the following libraries installed:

    actuate: [1.8.6]
    box2d: [1.2.3]
    extension-android-support-v4: [1.0.0]
    extension-googleplayservices-lib: [1.1.0]
    flixel-addons: 1.1.0 1.1.1 [2.0.0]
    flixel-demos: 1.1.2 [2.1.0]
    flixel-templates: 1.0.2 [2.0.1]
    flixel-tools: 1.1.1 1.1.2 [1.1.3]
    flixel-ui: 1.0.2 [2.0.0]
    flixel: 3.3.11 3.3.12 [4.0.1]
    ganalytics: [0.0.3]
    hxcpp: 3.2.180 3.2.193 3.2.205 3.3.47 [3.3.49]
    layout: [1.2.1]
    lime-samples: 2.5.1 [2.6.0]
    lime: 2.6.8 2.7.0 2.8.1 2.9.0 [2.9.1]
    openfl-samples: 3.1.0 3.3.0 [3.3.1]
    openfl: 3.0.0-beta.3 3.3.0 3.3.8 3.4.0 3.5.2 3.6.0 [3.6.1]
    samcodes-admob: [1.0.8]
    swf: 1.9.1 2.0.4 2.1.1 2.1.3 2.1.6 [2.2.0]

    In my Project.xml i set the following line of code:
    <android target-sdk-version="16" />

    So Far...

  • Same problem here, using 3.3.0-rc.1 + hxcpp 3.3.49.

    Windows and iOS compile fine, but Android is returning the same exact error as mentioned in the original post. Changing <android target-sdk-version="16" /> to 16 or any other number has no effect on the problem.

    I'm gonna try using Haxe and Hxcpp development versions to see if any or a combination of them solves the problem. I'll post the results here.

  • administrators

    @DakaSha This can be caused by importing openfl.utils.Dictionary. Are you using that class, or maybe have some unused imports to it lying around?

  • administrators

Log in to reply

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