-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Android.mk makefile? #107
Comments
Indeed, looks like https://github.com/madebr/SDL_net/actions/runs/11461755833/job/31891590260#step:11:77 |
There's something that I don't understand about this. Assets for SDL3_net release: https://github.com/madebr/SDL_net/actions/runs/11461840644 |
That's weird. Under Android Studio with my Makefile.mk and my fork of android-ifaddrs properly added to the project (in a folder parallel to the SDL3 and SDL3_net folders (which contain their include and src folders, as well as their Android.mk (with SDL3_net being the one listed in my post)), my own app using both properly compiles and runs. My app itself (using SDL2/SDL3 and optionally SDL2_net/SDL3_net (depending on SDL version) which is detected by installed modules (in my testcase it's SDL3 and SDL3_net, although I usually use SDL2 (2.26.5) and SDL2_net due to audio issues on newer SDL2 versions and SDL3 not being official yet). |
Although my android-ifaddrs repo uses the Android.mk building method (with ndk-build Makefile system (Android.mk)), not cmake? Perhaps that's the issue? |
Just checked with an Android-based telenet client connecting to 127.0.0.1. It properly connects and communicates using SDL_net. So the SDL3_net library using my Android.mk under Android Studio is working properly. |
Why can we not embed android-ifaddrs directly (e.g. as a static implementation detail) instead of building it as a shared dependency lib? That would, I believe, eliminate the linkage errors @madebr encountered. Is its license that incompatible with us? |
I've not yet tried to run the SDL_net samples on my phone. |
You can't put the ifaddr headers directly into the include path or (cmake) Makefile, as that would cause conflicts with the ifaddr implementation on other platforms that do natively support it? So you'd need to keep it seperated from the normal SDL3_net headers and build files. So the best way to support it is in a seperated repository for Android only like my supplied Android.mk uses. And Android.mk is still required (SDL3 itself does still support it from what I can see in it's repository) to compile SDL3_net on non-cmake Android platforms. Of course Android-ifaddrs' Android.mk might need to be adjusted for the different build scenarios, if that's still needed. So far with my shared libary executable it compiles and runs without issues (SDL3 3.1.3 with SDL3_net directly from this repository's latest commit). |
I noticed that the Android.mk file is missing for SDL3_net, required for compilation?
I've made one based on the old Android.mk and the current SDL3 Android.mk:
I managed to properly compile my app with it under Android Studio on Windows.
Although android-ifaddrs support is required to compile SDL3_net (My created Android port of it: https://github.com/superfury/android-ifaddrs).
The text was updated successfully, but these errors were encountered: