[android-developers] JNI Bluetooth Undefines in my Native code
Hi
Have this very large project that fails to find reference to "hci_get_route" and the other Bluez dev functions - ba2str, etc.. I have all the basic BT packages installed. I have created a simple Android.mk file and the <bluetooth/hci_lib.h> is found. When I do a plan "make" it does not have this problem, only ndk-build causes (so suspect some environment issue) -
undefined reference to `hci_get_route'
in my c file line - "int dev_id = hci_get_route(NULL);"
I have attempted to add the path /usr/include in my C_INCLUDE_PATH but nothing seems to work.
My current Android.mk file looks like this -
**************
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libccnd
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
# LOCAL_PATH = project_root/csrc/ccnd
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../android/
external/openssl-armv5/include
CCNDOBJ := ccnd.o ccnd_msg.o ccnd_internal_client.o ccnd_stats.o \
android_main.o android_msg.o ccnbt.o eth.o
CCNDSRC := $(CCNDOBJ:.o=.c)
LOCAL_SRC_FILES := $(CCNDSRC)
LOCAL_CFLAGS := -g
LOCAL_STATIC_LIBRARIES := libcrypto libccnx
LOCAL_SHARED_LIBRARIES := /usr/lib/libbluetooth.so
include $(BUILD_STATIC_LIBRARY)
************
Now because it is a large project with many directories this one happens to be in the jni/csrc/ccdn subdirectory. Simple native code is just in the jni directory, however I see not issue.
Anyone have this issue or know the issue.
-- CCNDOBJ := ccnd.o ccnd_msg.o ccnd_internal_client.o ccnd_stats.o \
android_main.o android_msg.o ccnbt.o eth.o
CCNDSRC := $(CCNDOBJ:.o=.c)
LOCAL_SRC_FILES := $(CCNDSRC)
LOCAL_CFLAGS := -g
LOCAL_STATIC_LIBRARIES := libcrypto libccnx
LOCAL_SHARED_LIBRARIES := /usr/lib/libbluetooth.so
include $(BUILD_STATIC_LIBRARY)
************
Now because it is a large project with many directories this one happens to be in the jni/csrc/ccdn subdirectory. Simple native code is just in the jni directory, however I see not issue.
Anyone have this issue or know the issue.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home