Я собираюсь портировать существующую игру, которая уже использует библиотеку SDL, для android с помощью NDK, но при вызове этого приложения происходит сбой (SDL_Init работает нормально, SetVideoMode падает):
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK | SDL_INIT_TIMER) < 0) {
screen = SDL_SetVideoMode(0, 0, 16, SDL_FULLSCREEN);
}
Есть идеи?
НДК-GDB:
Android NDK installation path: /cygdrive/c/android-sdk-windows/android-ndk-r7/.
Using default adb command: /cygdrive/c/android-sdk-windows/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.29
Using final ADB command: '/cygdrive/c/android-sdk-windows/platform-tools/adb'
Using specified project path: C:/Users/Revan/workspace/JazzDroid
Found package name: com.dscorp.jazzdroid
ABIs targetted by application: armeabi
Device API Level: 10
Device CPU ABI: armeabi
Compatible device ABI: armeabi
Found debuggable flag: true
Found device gdbserver: /data/data/com.dscorp.jazzdroid/lib/gdbserver
Using gdb setup init: ./libs/armeabi/gdb.setup
Using toolchain prefix: /cygdrive/c/android-sdk-windows/android-ndk-r7/./toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi
Found data directory: '/data/data/com.dscorp.jazzdroid'
Found first launchable activity: .SDLActivity
Launching activity: com.dscorp.jazzdroid/.SDLActivity
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb shell am start -n com.dscorp.jazzdroid/.SDLActivity
Starting: Intent { cmp=com.dscorp.jazzdroid/.SDLActivity }
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb shell sleep 2
Found running PID: 476
Launched gdbserver succesfully.
Setup network redirection
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb forward tcp:5039 localfilesystem:/data/data/com.dscorp.jazzdroid/debug-socket
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb shell run-as com.dscorp.jazzdroid lib/gdbserver +debug-socket --attach 476
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb pull /system/bin/app_process obj/local/armeabi/app_process
Cannot attach to process 476: No such process (3)
345 KB/s (5660 bytes in 0.016s)
Pulled app_process from device/emulator.
## COMMAND: /cygdrive/c/android-sdk-windows/platform-tools/adb pull /system/lib/libc.so obj/local/armeabi/libc.so
58 KB/s (273868 bytes in 4.574s)
Pulled libc.so from device/emulator.
cp: cannot stat `./libs/armeabi/gdb.setup': No such file or directory
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i586-mingw32msvc --target=arm-elf-linux".
(no debugging symbols found)
(gdb) C:\android-sdk-windows\android-ndk-r7/obj/local/armeabi/gdb.setup:2: Error in sourced command file:
Remote communication error: Bad file descriptor.