What are the differences between BUILD_STATIC_LIBRARY and BUILD_SHARED_LIBRARY?

Asked

Viewed 66 times

2

In trying to compile, I came across these two options, in my case only one worked, which led me to the questions:

  • What one could have, that the other doesn’t have?
  • What advantage, and disadvantage in using BUILD_STATIC_LIBRARY or BUILD_SHARED_LIBRARY?
  • There are others like these?

1 answer

1

BUILD_SHARED_LIBRARY: This variable points to a build script that collects all the information about the module you provided in your LOCAL_XXX, and determines how to build a shared destination library from the sources you listed. Using this script requires that you have already assigned values to LOCAL_MODULE and LOCAL_SRC_FILES.

BUILD_STATIC_LIBRARY: It is used to build a static library. The build system does not copy static libraries into your project/packages, but you can use them to build shared libraries.

In that reply, explains the difference, advantages and disadvantages of static and dynamic linkage.

To learn more about BUILD_STATIC_LIBRARY and BUILD_SHARED_LIBRARY the very documentation explain and suggest links so that you can better understand how they work.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.