Linking Static Library



We are a team trying to program the LightDrive from AndyMark using C++, but we’ve run into some trouble. The LightDrive includes a static library, “libMACHLib.a”, and a few header files, all found within the example code on AndyMark’s site. We figure the headers can be plopped into src/main/cpp/include. We’re unfamiliar with the Gradle build system and are unsure as to how we should link the .a file. Is there a simple way to do this?

Thanks for any assistance.


Read this thread - Cannot open source file "pthread.h"

It has instructions to do just what you are asking. I was trying to add multiple static libraries and got some help from the CD community.


Thanks, that thread was very helpful. Got everything to build successfully.