SDL: Error when compiling CMake project for android
Hello,
I’m currently developing a game with SDL and decided to try to port it to Android, i’m currently following this tutorial: https://github.com/libsdl-org/SDL/blob/main/docs/README-android.md
I’m trying to use the steps described for compiling with CMake, my project consists of two targets, one is a .so that has most of the game’s logic, and the game itself that uses SDL2 to show what happens inside the .so, as far as i’m aware the project was able to compile the .so fine, whoever when it tries to compile the SDL side of the project, i get this error repeatedly:
2022-07-22T00:39:16.607-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] /home/enzo/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include/mmintrin.h:504:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size 2022-07-22T00:39:16.607-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2); 2022-07-22T00:39:16.607-0300 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I tried googling for what this error means but couldn’t find a correct answer for it, could someone help me? I attached the CMakeLists from my project, it’s my first time trying to compile anything with NDK, so if there’s anything more that i can provide you just have to ask, thanks
CMakeLists.txt
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (9 by maintainers)
I will close it. Good luck with the Android port!
I don’t have much experience with Android development, so I can’t really help you with that.
I thought so, but when i double checked it i saw that i had only pulled SDL and SDL_ttf, after doing so for the rest it compiled and installed the apk without the need to change the CMakeLists, so i guess it’s solved Can i close this issue?
I’ll close it once I have pushed the fixed to the repo’s. It’s a reminder that something needs to be fixed 😃