问题
I'm trying to compile libdispatch for linux on Android. However I could not find any instructions for Android in the project files.
I can see there are several StackOverflow questions about using libdispatch, but the information is rather thin.
Has anyone successfully compiled libdispatch for Android using NDK?
回答1:
I haven't personally tried compiling libdispatch for Android, but I have built many other libraries. It looks like building libdispatch should be quite easy, as there is already an Android.mk file in the repository. You should be able to build this library with the following command (split across lines for readability):
<ndk directory path>/ndk-build \
-C <path to libdispatch source directory> \
NDK_LIBS_OUT=<path to directory for built libraries> \
APP_BUILD_SCRIPT=Android.mk
来源:https://stackoverflow.com/questions/36459329/compiling-libdispatch-gcd-for-android