android - Where does the NDK look for libraries? -


suppose want compile ndk c++ function in body calls function in library (like stl, etc). how tell ndk in pc library when compiling c++ function ndk make jump when function in library called ?

you have specify libraries in android.mk file.

for standard library, have specify in application.mk 1 want use, i.e.:

app_stl=gnustl_shared 

for gcc standard library.

for other libraries, have put in android.mk file library want use, , tell ndk build them if necessary.

for build library, put

include $(clear_vars)  local_module=<give name lib want link> local_export_c_includes=<path lib include directory> local_src_file=<path library binary file>   include $(prebuilt_shared_library) #or static if lib static 

for library must build, put

include $(clear_vars)  local_module=<give name lib want link> local_src_file=<list files necessary build lib> local_export_c_includes=<path lib include directory>  include $(build_shared_library) #or static if want build static 

then, after doing that, add following

local_static_libraries=<list static libs **using local_module names**>  local_shared_libraries=<list shared libs **using local_module names**> 

and voila!


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -