The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Console android app with SDL2?
Anton Smirnov
Guest

Hello.

Is there any possiblity to compile console android app with SDL2? I already have libGLES2.so for android and toolchain that is working on android and compile for android (using CppDroid).


According to "android-project" example the final artifacts is apk file but single executable (ELF) is desired.



My question on stackoverflow:
http://stackoverflow.com/questions/23237645/compile-console-android-app-with-sdl2



Regards, Anton.
Console android app with SDL2?
Anton Smirnov
Guest

sorry, libSDL2.so


2014-04-23 17:07 GMT+06:00 Anton Smirnov:
Quote:
Hello.

Is there any possiblity to compile console android app with SDL2? I already have libGLES2.so for android and toolchain that is working on android and compile for android (using CppDroid).


According to "android-project" example the final artifacts is apk file but single executable (ELF) is desired.



My question on stackoverflow:
http://stackoverflow.com/questions/23237645/compile-console-android-app-with-sdl2



Regards, Anton.

Console android app with SDL2?
Jorge Rodriguez
Guest

The link that the guy on SO sent you seems to be what you want. I don't think SDL will be in your toolchain if all you want is an Android console app in an ELF executable.



2014-04-23 13:19 GMT+02:00 Anton Smirnov:
Quote:
sorry, libSDL2.so


2014-04-23 17:07 GMT+06:00 Anton Smirnov:
Quote:
Hello.

Is there any possiblity to compile console android app with SDL2? I already have libGLES2.so for android and toolchain that is working on android and compile for android (using CppDroid).


According to "android-project" example the final artifacts is apk file but single executable (ELF) is desired.



My question on stackoverflow:
http://stackoverflow.com/questions/23237645/compile-console-android-app-with-sdl2



Regards, Anton.







_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
Jorge "Vino" Rodríguez
[ Tw | Fb | G+ | Ht ]
Console android app with SDL2?
Anton Smirnov
Guest

Not sure you understand the question correctly.
1. I know how to cross-compile SDL using Android NDK.
2. I have already compiled SDL2 and i have libSDL2.so for android (both ARM and x86)
3. I know how to use SDL in general (include header and link agains existing .so - -I, -L, -l).


So i'm able to compile executable which uses SDL2 on android (most likely).


Expected difficulty is that SurfaceFlinger will have to share frameBuffer between android graphics system and OpenGL.




2014-04-23 18:55 GMT+06:00 Jorge Rodriguez:
Quote:
The link that the guy on SO sent you seems to be what you want. I don't think SDL will be in your toolchain if all you want is an Android console app in an ELF executable.



2014-04-23 13:19 GMT+02:00 Anton Smirnov:
Quote:
sorry, libSDL2.so


2014-04-23 17:07 GMT+06:00 Anton Smirnov:
Quote:
Hello.

Is there any possiblity to compile console android app with SDL2? I already have libGLES2.so for android and toolchain that is working on android and compile for android (using CppDroid).


According to "android-project" example the final artifacts is apk file but single executable (ELF) is desired.



My question on stackoverflow:
http://stackoverflow.com/questions/23237645/compile-console-android-app-with-sdl2



Regards, Anton.









_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org




--
Jorge "Vino" Rodríguez
[ Tw | Fb | G+ | Ht ]



_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

You can compile an executable program
traveleru


Joined: 12 Aug 2014
Posts: 3
Location: ShenZhen. China
You can compile an executable program. Such as:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE:= AT4
LOCAL_ARM_MODE := arm

LOCAL_C_INCLUDES := /opt/SDL2Android/jni/include
LOCAL_SRC_FILES:= pic4d.cpp


LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)



LOCAL_LDLIBS := -llog -lSDL2

include $(BUILD_EXECUTABLE)