Chilkat C/C++ Libraries for Android

* Includes static libs for arm64-v8a, armeabi-v7a, x86, and x86_64.

Download

v10.0.0 27-Sep-2024sha256: 970b910b0d146e3681402a157d84e87bd489a947bbb682ba28366634fb5d44eb
Chilkat C/C++ Libs for Android

Chilkat Reference Documentation

Chilkat Sample Code

Chilkat Blog

Chilkat Release Notes

Install the binary distribution by extracting the files from the compressed archive. For example:

gzip -d chilkat-android-cpp.tar.gz
tar -xf chilkat-android-cpp.tar

This will create a 'chilkat-android-cpp' sub-directory containing the Chilkat C++ binary distribution.

C / C++ Headers

The C and C++ header files (.h) are located in the "include" subdirectory.

Static Libraries

The static libraries (each named libchilkat.a) are located in the "lib/arm64-v8a", "lib/armeabi-v7a", "lib/x86", and "lib/x86_64" subdirectories.

The -L compiler option may be used to add an additional directory to the library search path

Linker Options to Reduce EXE Size

Use the following linker options to minimize the size of your application's EXE.

-Wl,--gc-sections,--icf=safe

(For the arm64 architecture, omit the ",--icf=safe")

Android.mk for Building a "C" Application

Here is a sample Android.mk for building a "C" application. Even though your application may be purely "C" code, Chilkat requires the C++ runtime libs to be linked. This Android.mk shows how to do it. (Thank you Øyvind for this sample!)

LOCAL_PATH:= $(call my-dir)

# Chilkat lib
include $(CLEAR_VARS)
LOCAL_MODULE := ChilkatAndroid
LOCAL_SRC_FILES := /home/ubuntu/chilkat-android-cpp/libs/arm64-v8a/libchilkatAndroid.a
include $(PREBUILT_STATIC_LIBRARY)

# libc++static runtime
include $(CLEAR_VARS)
LOCAL_MODULE := libc++static
LOCAL_SRC_FILES := /opt/android-ndk-r17c/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a
include $(PREBUILT_STATIC_LIBRARY)

# libc++abi_static runtime
include $(CLEAR_VARS)
LOCAL_MODULE := libc++abi_static
LOCAL_SRC_FILES := /opt/android-ndk-r17c/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_STATIC_LIBRARIES +=    ChilkatAndroid \
	                            libc++static \
	                            libc++abi_static

LOCAL_C_INCLUDES += /home/ubuntu/chilkat-android-cpp/include
LOCAL_SRC_FILES := main.c 
LOCAL_MODULE := chilkattest_with_ndk_c
include $(BUILD_EXECUTABLE)