Skip to content
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

Problems when compile SDL for Android #6040

Closed
paulocoutinhox opened this issue Aug 12, 2022 · 5 comments
Closed

Problems when compile SDL for Android #6040

paulocoutinhox opened this issue Aug 12, 2022 · 5 comments

Comments

@paulocoutinhox
Copy link

Hi,

I have problems when compile SDL for Android.

Error:

[ 75%] Building C object source_subfolder/CMakeFiles/SDL2-static.dir/src/core/android/SDL_android.c.o
/home/runner/.conan/data/sdl/2.0.20/_/_/build/98e3678ed19f99c0483677b19b96a546e7f57fad/source_subfolder/src/core/android/SDL_android.c:515:13: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
    JNIEnv *env = NULL;
            ^
/home/runner/.conan/data/sdl/2.0.20/_/_/build/98e3678ed19f99c0483677b19b96a546e7f57fad/source_subfolder/src/core/android/SDL_android.c:2551:13: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
    jstring jpermission = (*env)->NewStringUTF(env, permission);
            ^
2 errors generated.
make[2]: *** [source_subfolder/CMakeFiles/SDL2-static.dir/build.make:1742: source_subfolder/CMakeFiles/SDL2-static.dir/src/core/android/SDL_android.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:153: source_subfolder/CMakeFiles/SDL2-static.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Full log:
https://github.com/nativium/nativium-game/runs/7808781256?check_suite_focus=true#step:14:4837

@slouken
Copy link
Collaborator

slouken commented Aug 12, 2022

Have you tried the latest snapshot?
https://www.libsdl.org/tmp/SDL-2.0.zip

@paulocoutinhox
Copy link
Author

No,

Im trying this:

url: "https://www.libsdl.org/release/SDL2-2.0.20.tar.gz"
sha256: c56aba1d7b5b0e7e999e4a7698c70b63a3394ff9704b5f6e1c57e0c16f04dd06

From:
https://github.com/conan-io/conan-center-index/blob/master/recipes/sdl/all/conandata.yml

@slouken
Copy link
Collaborator

slouken commented Aug 12, 2022

Okay, this is already fixed for the next release.

Cheers,

@paulocoutinhox
Copy link
Author

Thanks. Do you know when it will be released?

@slouken
Copy link
Collaborator

slouken commented Aug 12, 2022

We're ironing out the last couple of bugs, hopefully soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants