Question

I'm just getting to know nme haxe developing, I'm currently using flashdevelop. I have a problem when building a sample app (piratepig) under android platform. Lots of "no such file or directory". Everything seems fine when I choose windows, Html5, or flash platforms.

Here's the output:

Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\Valentin\Desktop\PiratePig\Pirate Pig.hxproj" -ipc 2a666e48-3f38-4abd-b63a-25219cb72cf4 -version "2.10" -compiler "C:\Motion-Twin\Haxe" -library "C:\Program Files (x86)\FlashDevelop\Library" -target "android"
Building Pirate Pig
haxelib run nme build C:\Users\Valentin\Desktop\PiratePig\project.nmml android -debug
haxelib run hxcpp Build.xml haxe -Ddebug -Dactuate -Dandroid -Dcpp -Ddebug -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dmobile -Dnme -Dnme_install_tool -Dsys -Dtrue
Creating hxcpp.h.gch...
arm-linux-androideabi-g++ -Iinclude --sysroot=C:\Development\Android NDK/platforms/android-5/arch-arm -IC:\Development\Android NDK/sources/cxx-stl/gnu-libstdc++/include -IC:\Development\Android NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -DHXCPP_DEBUG -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -IC:\Motion-Twin\Haxe\lib\hxcpp\2,10//include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -D_LINUX_STDDEF_H  -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 -DANDROID -Wa,--noexecstack -O0 -DNDEBUG -c -frtti -o hxcpp.h.gch C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:13:20: error: typeinfo: No such file or directory
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:170:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h:195:21: error: algorithm: No such file or directory
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:162:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hx/Object.h: In member function 'void hx::ObjectPtr<O>::CastPtr(hx::Object*)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hx/Object.h:143: error: must #include <typeinfo> before using typeid
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:170:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h: In member function 'void Array_obj<ELEM_>::sort(Dynamic)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Array.h:388: error: 'sort' is not a member of 'std'
In file included from C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/hxcpp.h:171:
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Class.h: In function 'bool hx::TCanCast(hx::Object*)':
C:\Motion-Twin\Haxe\lib\hxcpp\2,10//include/Class.h:139: error: must #include <typeinfo> before using typeid
Called from ? line 1
Called from BuildTool.hx line 1265
Called from BuildTool.hx line 554
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 739
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 1 - build cancelled
Error : Build failed
Build halted with errors (haxelib.exe).
Done(1)

Does anyone have a clue, what could be wrong? I tried running a simple helloworld app in eclipse (so that i can be sure that its related to haxe, and nme), but the helloword app works perfectly.

Was it helpful?

Solution 2

The problem was solved a long time ago, through some hit on google. I cant find it now, but it was something about the NDK directory, i had to move or copy some files in the structure. It might have been something like this

As far as I remember it was something similar to this (answer posted by Andy on openfl):

Copy the files from ${ANDROID_NDK_ROOT}\sources\cxx-stl\gnu-libstdc++\4.4.3\ to ${ANDROID_NDK_ROOT}\sources\cxx-stl\gnu-libstdc++\

Here's the link to his answer, and some similar questions above:

http://www.openfl.org/developer/forums/installing-openfl/beginner-questions-android-build-failed/

OTHER TIPS

did you use NME 3.5.3 or higher? then you need to switch to hxcpp 2.10.3 . it will solve the problem. try to update the hxcpp through haxelib with this command

haxelib upgrade

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top