[android-porting] Re: Problems by compiling native code

2010-12-09 Thread Dudero
I have found a solution: build the executable statically: arm-linux-gcc -o -static myexe myexe.c simple ;-) But it would be very interessting if anybody could explain me which libraries are necessary for android to get an executable runnable without statically building? Best Regards, Andreas

[android-porting] Re: Problems by compiling native code

2010-12-09 Thread skaggmannen
Hi Andreas, You need to make sure that your binary links with bionic and not glibc. This is pretty tricky and the easiest is to create a Android.mk and compile your binary as a part of the Android build system. This is what a typical Android.mk looks like: LOCAL_PATH := $(my-dir) include $(CLEAR

[android-porting] Re: Problems by compiling native code

2010-12-12 Thread Dudero
Thanks guys for your advice! But now I have another problem with native code ;-) Accessing a shared libary by an C executable: I have built a simple library: "libhello.so" "hello.h" extern void hello(void); "hello.c" ---

[android-porting] Re: Problems by compiling native code

2010-12-12 Thread Robin
kindly try removing the libhello from LOCAL_SHARED_LIBRARIES and try again. This is for creating executable or for creating shared lib ? I believe its for generating exe. Reg, robin. On Dec 12, 4:33 am, Dudero wrote: > Thanks guys for your advice! > > But now I have another problem with native c

[android-porting] Re: Problems by compiling native code

2010-12-13 Thread Dudero
thanks for your hint, robin - now i got it to work: Android.mk #Build libhello shared libary LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := hello.c LOCAL_CFLAGS := -Wall LOCAL_MODULE := libhello include $(BUILD_SHARED_LIBRARY) #Build the test_hello exec

Re: [android-porting] Re: Problems by compiling native code

2010-12-10 Thread Deva R
>But it would be very interessting if anybody could explain me which >libraries are necessary for android to get an executable runnable >without statically building? Since android got bionic as libc (not regular GNU libc), all user side binaries should built linking with bionic (for dynamic loading