Reputation: 6839
Following is my MAKE file for the source that i'm compiling with the build AOSP
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= abc.c
LOCAL_MODULE:= abc
LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_STATIC_LIBRARIES := libc
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_MODULE_TAGS := debug
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/../../../external/sqlite/dist \
$(LOCAL_PATH)/../../../external/sqlite/android
LOCAL_SHARED_LIBRARIES := \
libsqlite \
libsqlite3_android
include $(BUILD_EXECUTABLE)
here, in the source abc.c
i'm trying to use the functions declared in sqlite3.h
. When i'm trying to build the android source it is returning error
no rule libsqlite3_android.so to make target abc.so
i want to link the sqlite library to my source file.
Plz help me to find where i'm going wrong and how can i solve the problem.
Upvotes: 0
Views: 1472
Reputation: 646
In fact, you shouldn't have to link with libsqlite3_android library.
According to the AOSP libsqlite makefile (external/sqlite/android/Android.mk
), libsqlite3_android is a STATIC library which is included in the libsqlite dynamic library (external/sqlite/dist/Android.mk
).
So linking with libsqlite should be enough.
Upvotes: 1
Reputation: 10368
First, make sure you have built SQLite3 before. (You should build the whole project before add any new stuff or customize any code)
Second, make sure you are build the same target product when you build the SQLite3. (Make sure you have select the correct menu when you do 'lunch').
Last, make sure the SQLite3 objects is in the target folders. YOURANDROIDROOT/out/target/PRODUCTNAME/system/symbols...
Upvotes: 1