Hi, I have struggled with it for couple of days~~ we customized Android frameworks by adding a service component into $ANDROID/frameworks/base/ folder
The service component needs to use $ANDROID/external/jpeg library, but we got link error: The Android.mk is as follows: #################### LOCAL_PATH:= $(call my-dir) # include $(CLEAR_VARS) ifeq ($(USE_CAMERA_STUB),) USE_CAMERA_STUB:= false ifneq ($(filter sooner generic sim,$(TARGET_DEVICE)),) USE_CAMERA_STUB:=true endif #libcamerastub endif ifeq ($(USE_CAMERA_STUB),true) # # libcamerastub # LOCAL_C_INCLUDES := external/jpeg LOCAL_STATIC_LIBRARIES := libjpeg LOCAL_SRC_FILES := ... ifeq ($(TARGET_SIMULATOR),true) LOCAL_CFLAGS += -DSINGLE_PROCESS endif LOCAL_MODULE:= libcamerastub include $(BUILD_STATIC_LIBRARY) endif # USE_CAMERA_STUB # # libcameraservice # include $(CLEAR_VARS) LOCAL_C_INCLUDES := external/jpeg LOCAL_SRC_FILES := ... LOCAL_MODULE:= libcameraservice LOCAL_SHARED_LIBRARIES:= \ libui \ libutils \ libbinder \ libcutils \ libmedia LOCAL_PRELINK_MODULE := false ifeq ($(TARGET_SIMULATOR),true) LOCAL_CFLAGS += -DSINGLE_PROCESS endif LOCAL_STATIC_LIBRARIES := libjpeg ifeq ($(USE_CAMERA_STUB), true) LOCAL_STATIC_LIBRARIES += libcamerastub else LOCAL_SHARED_LIBRARIES += libcamera endif include $(BUILD_SHARED_LIBRARY) #################### And the errors are: out/target/product/devkit8000/obj/STATIC_LIBRARIES/libcamerastub_intermediates/libcamerastub.a(xxx.o): In function `android::xxx::fxn()': /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:314: undefined reference to `jpeg_std_error' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:315: undefined reference to `jpeg_CreateCompress' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:322: undefined reference to `jpeg_stdio_dest' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:341: undefined reference to `jpeg_set_defaults' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:351: undefined reference to `jpeg_set_quality' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:354: undefined reference to `jpeg_set_quality' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:355: undefined reference to `jpeg_simple_progression' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:360: undefined reference to `jpeg_start_compress' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:366: undefined reference to `jpeg_write_scanlines' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:370: undefined reference to `jpeg_finish_compress' /work/0xdroid/frameworks/base/camera/libcameraservice/filexxx.cpp:372: undefined reference to `jpeg_destroy_compress' collect2: ld returned 1 exit status make: *** [out/target/product/devkit8000/obj/SHARED_LIBRARIES/libcamerastub_intermediates/LINKED/libcameraservice.so] Error 1 make: *** Waiting for unfinished jobs.... ~/work/0xdroid$ -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting