What is difference between:
- Loading an Shared library using dlopen() available in dlfcn.h
- Including the shared library in Android.mk file while building the executable.
Code example: Android.mk file:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
test.c
LOCAL_SHARED_LIBRARIES := \ libtest
LOCAL_MODULE:= test
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
include $(BUILD_EXECUTABLE)
While executing the above 2 methods, which is the better/more efficient way of implementing?