SDL2 on Android using CMake built-in nvidia nsight tegra - S |
SDL2 on Android using CMake built-in nvidia nsight tegra - S |
Peter List
Guest
|
I worked around that error by editing SDL_android_main.c:
extern "C" { /* Called before SDL_main() to initialize JNI bindings in SDL library */ extern void SDL_Android_Init(JNIEnv* env, jclass cls); } So I'm at least able to build again now... Though it still crashes when I try to run the APK... On Tue, Aug 25, 2015 at 12:48 AM, Peter List wrote:
|
|||||||||||||||
|
SDL2 on Android using CMake built-in nvidia nsight tegra - S |
Peter List
Guest
|
I found a second change required to get hello world SDL2-2.0.3 working on Android with cmake + nvidia tegra nsight for visual studio 2010. This second issue I found with adb logcat:
W/dalvikvm( 5954): No implementation found for native Lorg/libsdl/app/SDLActivity;.nativeInit:()V W/dalvikvm( 5954): threadid=11: thread exiting with uncaught exception (group=0x418d2c80) E/AndroidRuntime( 5954): FATAL EXCEPTION: SDLThread E/AndroidRuntime( 5954): Process: org.libsdl.app, PID: 5954 E/AndroidRuntime( 5954): java.lang.UnsatisfiedLinkError: Native method not found: org.libsdl.app.SDLActivity.nativeInit:()V E/AndroidRuntime( 5954):     at org.libsdl.app.SDLActivity.nativeInit(Native Method) E/AndroidRuntime( 5954):     at org.libsdl.app.SDLMain.run(SDLActivity.java:510) E/AndroidRuntime( 5954):     at java.lang.Thread.run(Thread.java:841) I/AndroidRuntime( 5954): To Report FATAL to activityManagerService The fix: extern "C" // required to avoid build link error { /* Called before SDL_main() to initialize JNI bindings in SDL library */ extern void SDL_Android_Init(JNIEnv* env, jclass cls); // required to avoid run found with adb logcat extern void Java_org_libsdl_app_SDLActivity_nativeInit(JNIEnv* env, jclass cls, jobject obj); } I hope this helps someone. Also, I think this change should be included in the next code release of SDL2? On Tue, Aug 25, 2015 at 1:10 AM, Peter List wrote:
|
|||||||||||||||||
|
SDL2 on Android using CMake built-in nvidia nsight tegra - S |
Martin Gerhardy
Guest
|
If you have the unresolved symbol and are linking statically, then you most likely miss this: https://github.com/mgerhardy/caveexpress/blob/master/src/libs/sdl2/CMakeLists.txt#L164
Am 25.08.2015 um 16:57 schrieb Peter List:
|
|||||||||||||||||||||
|