Reputation: 810
I have two separate projects and one project is used for building Boost library and the other one makes calls from the built boost library.
Boost project compiles fine and produces libboost.a file. What I want to achieve is to add this library to my other NDK project and make calls to Boost from it. I have looked around quite much and almost all solutions consists of copying the built library to the main project directory along with header files but I don't want to move files around all the time. Is there any other decent way to achieve this?
Upvotes: 2
Views: 880
Reputation: 57163
Look at https://android.googlesource.com/platform/ndk/+/675fe49445e65ba44d91f4d85ed9b4d5b5ff6745/docs/IMPORT-MODULE.TXT for discussion, and see Include Boost C++ library in android for boost-specific instructions.
Upvotes: 0
Reputation: 5085
You can add your Boost library header files path to your Android.mk file with something like the following:
LOCAL_C_INCLUDES += ../MyBoostLib/inc
You can add your Boost library to your Android.mk file with something like the following:
LOCAL_LDLIBS += ../MyBoostLib/obj/local/armeabi/libMyBoostLib.a
As long as the relationship between the two project locations remains the same, you should be OK.
Upvotes: 3