Just build a simple "helloworld" using android ndk
, but I got shard object which I supposed to get executable file. And after I pushed this file to my arm emulator, I got a segmentation fault, but real device is OK. What's the problem?
Here is my os version:
Darwin avator 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 i386 MacBookPro11,1 Darwin
Here is my Android.mk
:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test-libstl
LOCAL_SRC_FILES := test-libstl.cpp
include $(BUILD_EXECUTABLE)
And after ndk-build
,I got the file:
$file ../libs/arm64-v8a/test-libstl
../libs/arm64-v8a/test-libstl: ELF 64-bit LSB shared object, version 1 (SYSV), dynamically linked (uses shared libs), stripped