Android NDK: how to link multiple 3rd party libraries
问题 Let's say we're building a shared library A that needs to link to 2 external static libs B and C. All you've got are libB.a and libC.a, along with their header files. Here's a simplified Android.mk for libA: LOCAL_LDLIBS := ../external/libB.a ../external/libC.a include $(BUILD_SHARED_LIBRARY) AFAIK, the way linking works for shared libraries is: grab all object files of B and C strip out object files that A doesn't reference resolve references in B and C This gives link errors because B and C