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
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
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"
---
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
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
>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