openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
761 stars 375 forks source link

Error when compiling to Android #1857

Closed Arolox666 closed 1 week ago

Arolox666 commented 2 weeks ago

Hi, I have an issue when I try to compile to android so whenever I use lime test android it says

Creating D:/default/export/android/obj/obj/android-v7/__pch/haxe/hxcpp.h.gch...
C:/HaxeToolkit/haxe/lib/hxcpp/4,3,2/include/hxcpp.h:27:13: fatal error: 'typeinfo' file not found
   27 |    #include <typeinfo>
      |             ^~~~~~~~~~
1 error generated.
Error: Could not create PCH

Also if this is hxcpp problem just tell me.

Also if it matters here is my lime version: 8.2.1 and Haxe version: 4.1.0 and if this really matters (I hope not) my os: Windows 11 Pro 23H2

moxie-coder commented 2 weeks ago

firstly, use haxe 4.3.6, second, when you download Visual Studio, you need to install the C++ Workflow or these components MSVC v143 VS 2022 C++ x64/x86 build tools Windows 10/11 SDK

Arolox666 commented 2 weeks ago

firstly, use haxe 4.3.6, second, when you download Visual Studio, you need to install the C++ Workflow or these components MSVC v143 VS 2022 C++ x64/x86 build tools Windows 10/11 SDK

I updated haxe and I already had both of these components and still the same issue

player-03 commented 2 weeks ago

What NDK version are you using? You can check using lime setup android.

Arolox666 commented 2 weeks ago

What NDK version are you using? You can check using lime setup android.

28.0.12433566

Also sorry for the late reply I was sleeping 'cause of time zones existing

player-03 commented 2 weeks ago

Currently, Lime is only confirmed to work with NDK versions r15c and r21e.

If and when hxcpp ever pushes their latest changes to Haxelib, we'll be able to add support for newer versions. But it's been a year and a half with no news, so who knows.

Arolox666 commented 2 weeks ago

okay thanks I will download older version of the ndk then

Arolox666 commented 1 week ago

Reopening as downloading the older ndk version did nothing. Also sorry for later response to all this I was not home. I downloaded a tried both none of them worked.

player-03 commented 1 week ago

And you ran lime setup android again, and entered the full path to the 21.4.7075529 folder?

Arolox666 commented 1 week ago

And you ran lime setup android again, and entered the full path to the 21.4.7075529 folder?

yes i did even reinstalled lime to see if its not just an issue with lime istallation

player-03 commented 1 week ago

Also if this is hxcpp problem just tell me.

Now that I think about it, one of the latest Haxelib releases of hxcpp was broken in some way. I forget if that was 4.3.2, but it certainly wouldn't hurt to switch to the git version.

Arolox666 commented 1 week ago

Also if this is hxcpp problem just tell me.

Now that I think about it, one of the latest Haxelib releases of hxcpp was broken in some way. I forget if that was 4.3.2, but it certainly wouldn't hurt to switch to the git version.

Yep that worked thank you so so much.