I want to built a native version of Google's protocol buffers library.
How would I do that?
相关问题
- How to fix NDK build error for HelloCardboard samp
- android-ndk gnustl_static exe not working
- Error SSL archive symbol table (run ranlib)
- connect error of socket programming via ndk
- ffmpeg for Android: neon build has text relocation
相关文章
- What share of Android devices benefits from Libjpe
- Android Studio 3.3 Stuck at Project Setup:reading
- Android NDK: calling java method from JNI C class
- How to use pthreads with Android NDK? [closed]
- Writeable and Executable location on Android
- Android Resources Folders by Screen Size
- How to not freeze the UI, and wait for response?
- How to implement call recording with android ndk
I Use this Android.mk and build SUCCESSFUL
Android.mk mentioned above works fine, thanks a lot.
I would like to describe all the steps for building protobuf for android.
Configure sources for android. Use the following script (got it here: http://habrahabr.ru/post/119693/):
PREBUILT=/Users/user/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3
PLATFORM=/Users/user/android-ndk-r7b/platforms/android-3/arch-arm/
export CC="/Users/user/android-ndk-r7b/toolchains/arm-linux-androideabi- 4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-gcc"
export CFLAGS="-fPIC -DANDROID -nostdlib"
export ANDROID_ROOT="/Users/user/android-ndk-r7b"
export LDFLAGS="-Wl,-rpath-link=$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib/ -L$ANDROID_ROOT/platforms/android-3/arch-arm/usr/lib/"
export CPPFLAGS="-I$ANDROID_ROOT/platforms/android-3/arch-arm/usr/include/"
export LIBS="-lc "
./configure --host=arm-eabi
Delete the following lines from mentioned above Android.mk file:
It is needed for building lite version of library. Unfortunately full version of the lib works just from Android 2.3. I tested lite version for Android 1.6, 2.1, 2.3.