Libmodbus for android is a set of tools to compile libmodbus library (http://github.com/stephane/libmodbus) for the Android platform.
To compile libmodbus for android you may use one of the following NDKs:
- NDK r7 customized by CrystaX.
- other SDK is not tested yet. you can help =)
- NDK (customized by CrystaX)
- Git (from repo or msysgit for mindows)
- CMake (from repo or cmake from official website)
Export environment variable ANDROID_NDK=/absolute/path/to/the/android-ndk
./build-android.sh
While working in cmake-gui to select the installation directory, and other settings different from default settings.
In case you encounter bunch of linker errors when building your app with libmodbus, this might help:
Add -lgnustl_static
AFTER all boost libraries to the LOCAL_LDLIBS line in Android.mk. Example:
LOCAL_LDLIBS += lmodbus -lgnustl_static