Linking Static Library


#1

Hi,

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.


#2

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.


#3

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