Error compiling Android with Lime (Windows 10)

675 views Asked by At

I'm porting a working windows application to android. I've:

  • run haxelib run lime setup android
  • set sdk location to be C:\Users\username\AppData\Local\Android\Sdk
  • set ndk location to be C:\Users\username\AppData\Local\Android\Sdk\ndk-bundle
  • set ndk location to be C:\Users\username\AppData\Local\Android\Sdk\ndk-bundle
  • Ran haxelib run lime build "project.xml" android -debug -Dfdb

I get this:

Creating D:/database-tools/bin/android/obj/obj/android-debug-v7/__pch/haxe/hxcpp.h.gch... In file included from C:\Users\jdoughty\AppData\Local\Android\Sdk\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/typeinfo:34:0, from C:/HaxeToolkit/haxe/lib/hxcpp/3,4,188/include/hxcpp.h:19: C:\Users\jdoughty\AppData\Local\Android\Sdk\ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/exception:37:28: fatal error: bits/c++config.h: No such file or directory #include

compilation terminated.

Error: Could not create PCH

Build halted with errors.

1

There are 1 answers

1
Joshua Granick On BEST ANSWER
  1. Try using an older Android NDK (between r13b and r15c)
  2. Make sure API 19 is installed using your Android SDK

The Android NDK recently dropped support for GCC, but we are working to help make a clang toolchain config for Android and HXCPP.