Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: JNI Android makefile
i have created an android application,here most of my code is in c so i have created it using jni. i have to create file, in which i have to use the
while using the in i get the error:undefined reference to function(). my function() is present inside the so to avid this by suggestion i have created my as below:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libtest
include $(CLEAR_VARS)
LOCAL_MODULE := socket
LOCAL_SRC_FILES := source/interface.c source/file.c
LOCAL_LDFLAGS += libtest.a  
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../libtest/jni/include
but it requires both the & libtest.a file to be present. where as if i am using only the libtest.a it works perfectly fine.
since my requirement is to create and include it in can any one please tell me how to avoid dependency of .a file to create .so file.
if i will comment LOCAL_LDFLAGS += libtest.a then i am getting the error:undefined reference to function()
any one plz help me to get out of this problem.......
Posted 2-Aug-12 20:22pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 575
1 Maciej Los 555
2 Sascha Lefévre 264
3 Suvendu Shekhar Giri 229
4 Richard Deeming 195
0 Sergey Alexandrovich Kryukov 9,693
1 OriginalGriff 9,185
2 Peter Leow 5,112
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 2,876

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100