• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Pb link library abstract interface

ragoon

Lurker
Jul 22, 2011
1
0
Hello,

I have a problem with the NDK to link with libaudio.
I use adb pull to get libraries I'm using from the mobile.
But during the link, ld requires all the libraries the libaudio reference to.
The problem is that I want this program to be generic and not linking with specific libraries. Moreover, the libaudio interface is abstract and should not required additionnal dependencies.

May be there is a missing CXX flag can anybody help?

Here the makefile (test contain the main and audioTest the class using libaudio):
Code:
ANDROID_SRC := /mnt/gingerbread

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE     := audiotest
LOCAL_SRC_FILES  := audioTest.cpp test.cpp
LOCAL_C_INCLUDES := $(ANDROID_SRC)/frameworks/base/include \
                    $(ANDROID_SRC)/system/core/include \
                    $(ANDROID_SRC)/hardware/libhardware_legacy/include \
                    $(ANDROID_SRC)/hardware
LOCAL_LDLIBS     := -L$(LOCAL_PATH)/../system_libs -lutils -lcutils -laudio
LOCAL_CXXFLAGS   := -Wall -D__STDC_LIMIT_MACROS
include $(BUILD_EXECUTABLE)
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones