I've been developing with android for sometime, and I think that it's a great platform. Recently, I also started using a library called allegro. I was looking for a port of allegro to android, but no one made something like that, at least not yet. However, there have been a couple of unofficial ports of SDL to android. So, I looked up a guide to using SDL for android, and I found one: http://jiggawatt.org/badc0de/android/index.html#gifflen.
I got the ARM tool chain from that site, and also recompiled SDL with the modifications. Before I started using SDL, I just wanted to check if it worked. I tried to do the part about "Hello, World". So I made a file called hello.c, with the following content:
#include
int main(int argc, char **argv)
{
printf("Hello, world!\n");
return 0;
}
I compiled it with:
arm-none-linux-gnueabi-gcc -static -o hello hello.c
Then, I tried to use adb to send the file an emulator's file system:
adb push hello /data/misc/hello
Then, so that I could execute it:
adb shell chmod 777 /data/misc/hello
And then I tried to run it with:
adb shell /data/misc/hello
It gives me:
[1] Segmentation fault /data/misc/hello
What did I do wrong?
I'm using Ubuntu 10.04.



Adv Reply

Bookmarks