Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6224535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:41:23+00:00 2026-05-24T08:41:23+00:00

I am not able to build shared library with static libraries. I downloaded some

  • 0

I am not able to build shared library with static libraries.
I downloaded some code from the web and i am trying to make it as a lib for my android project, but i am not able to create the shared libraries for the same.

Please find my Android.mk file below

LOCAL_PATH := $(call my-dir)
MY_PATH := $(LOCAL_PATH)

include $(CLEAR_VARS)
LOCAL_CFLAGS := -DFIXED_POINT -DEXPORT=""
LOCAL_EXPORT_LDLIBS := -llog
LOCAL_MODULE := dspmath
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/code $(LOCAL_PATH)/dsp_fx \
$(LOCAL_PATH)/dspmath $(LOCAL_PATH)/ttylib
LOCAL_SRC_FILES := \
dspmath/ehwutl.c    dspmath/mathadv.c   dspmath/mathevrc.c \
dspmath/globdefs.c  dspmath/mathdp31.c
include $(BUILD_SHARED_LIBRARY)



include $(CLEAR_VARS)
LOCAL_CFLAGS := -DFIXED_POINT -DEXPORT=""
LOCAL_MODULE := dsp_fx
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/code $(LOCAL_PATH)/dsp_fx \
$(LOCAL_PATH)/dspmath $(LOCAL_PATH)/ttylib
LOCAL_SRC_FILES := \
dsp_fx/basic_op.c    dsp_fx/lib_wmp_fx.c  dsp_fx/math_adv40.c  dsp_fx/math_ext40.c \
dsp_fx/basic_op40.c  dsp_fx/math_adv.c    dsp_fx/math_ext32.c
include $(BUILD_SHARED_LIBRARY)



include $(CLEAR_VARS)
LOCAL_CFLAGS := -DFIXED_POINT -DEXPORT=""
LOCAL_MODULE := ttylib
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/code $(LOCAL_PATH)/dsp_fx \
$(LOCAL_PATH)/dspmath $(LOCAL_PATH)/ttylib
LOCAL_SRC_FILES := \
ttylib/bdo2dit.c   ttylib/tty_char.c  ttylib/tty_gen.c   ttylib/ttystate.c \
ttylib/dit2a.c     ttylib/tty_dbg.c   ttylib/tty_glob.c \
ttylib/tone_gen.c  ttylib/tty_dec.c   ttylib/tty_hdr.c \
ttylib/tty_bit.c   ttylib/tty_enc.c   ttylib/tty_rate.c
include $(BUILD_SHARED_LIBRARY)




include $(CLEAR_VARS)
LOCAL_CFLAGS := -DFIXED_POINT -DEXPORT=""
LOCAL_EXPORT_LDLIBS := -llog
LOCAL_MODULE := code
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/code $(LOCAL_PATH)/dsp_fx \
$(LOCAL_PATH)/dspmath $(LOCAL_PATH)/ttylib
LOCAL_SRC_FILES := \
code/a2lsp.c     code/convh.c     code/fcbgq.c     code/inv_sqrt.c  code/putacbc.c \
code/acb_ex.c    code/cshift.c    code/fer.c       code/lpcana.c    code/r_fft.c \
code/acelp_pf.c  code/d3_10pf.c   code/filter.c    code/lsp2a.c     code/rda.c \
code/apf.c       code/d8_35pf.c   code/fndppf.c    code/lspmaq.c    code/rom.c \
code/auto.c      code/d_fer.c     code/getext1k.c  code/main.c      code/synfltr.c \
code/bitpack.c   code/d_globs.c   code/getgain.c   code/maxeloc.c   code/w2res.c \
code/bitupack.c  code/d_no_fer.c  code/getopt.c    code/mdfyorig.c  code/weight.c \
code/bl_intrp.c  code/d_rate_1.c  code/getres.c    code/mod.c       code/zeroinpt.c \
code/bqiir.c     code/decode.c    code/globs.c     code/ns127.c \
code/c3_10pf.c   code/durbin.c    code/impulser.c  code/pit_shrp.c \
code/c8_35pf.c   code/e_globs.c   code/interpol.c  code/pktoav.c \
code/comacb.c    code/encode.c    code/intr_cos.c  code/pre_enc.c
include $(BUILD_SHARED_LIBRARY)


LOCAL_PATH := $(MY_PATH)
include $(CLEAR_VARS)
LOCAL_CFLAGS := -DFIXED_POINT -DEXPORT=""
LOCAL_MODULE := evrc
LOCAL_SHARED_LIBRARIES := dspmath code dsp_fx ttylib
include $(BUILD_SHARED_LIBRARY)

After executing the above make file , i am getting the output in the diff folder like this
1) The above make file is in the $(PROJECT)/jni folder
2) Outpur files are getting generated int he $(PROJECT)/obj/local/armeabi

-rwxr-xr-x+ 1 TPRM73 Domain Users 468K Aug  1 17:40 libcode.a
-rwxr-xr-x+ 1 TPRM73 Domain Users  80K Aug  1 17:40 libdsp_fx.a
-rwxr-xr-x+ 1 TPRM73 Domain Users  73K Aug  1 17:40 libdspmath.a
-rwxr-xr-x+ 1 TPRM73 Domain Users 3.6K Aug  1 17:41 libevrc.so
-rwxr-xr-x+ 1 TPRM73 Domain Users 101K Aug  1 17:41 libttylib.a
drwxr-xr-x+ 1 TPRM73 Domain Users    0 Aug  1 17:40 objs

If u observe the size of libevrc.so, it is 3.6K which is less than the static libraries. Please help me inresolving the above issue. Please let me know if u want more information.

Thanks & Regards,
SSuman185

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:41:24+00:00Added an answer on May 24, 2026 at 8:41 am

    We have to use LOCAL_WHOLE_STATIC_LIBRARIES instead of LOCAL_STATIC_LIBRARIES, to avoid the removal of unused functions so that the whole static library will be loaded in the shared library.

    This is the basic answer I got from Google. Anyone please add more information if they know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At first, I was not able to build a new blank project to iPhone
I am not able to make a clear decision on this one. I am
I'm trying to build Boost.MPI 1.47 with Intel MPI 4.0.0.012, but Boost is not
I am not able to call a function in cpp file from c file
Using bjam on ubuntu, I am building a c++ shared library and trying to
In CMake, I'm trying to build a project that includes libraries for multiple different
I am not able to access localhost https pages in firefox3. It gave the
I am not able to use the breakpoint in Studio with Javascript. I'm able
Why are we not able to override an instance variable of a super class
I am not able to figure out this simple thing in ASP.NET MVC: I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.