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 7434603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:55:11+00:00 2026-05-29T09:55:11+00:00

I have 2 projects: 1 – Android Native project 2 – C/C++ Project I’m

  • 0

I have 2 projects:

1 – Android Native project

2 – C/C++ Project

I’m building my shared library files (.so) in a C/C++ project and want to use those .so files in Android Native project.
I don’t want to copy and paste these library files from one project to another.

First of all is it possible to use those .so files from my native Android project by using some reference etc to C++ library project?

Would it be easier to find a way to automatically copy the .so files from the C++ library project to the Android native project?

  • 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-29T09:55:12+00:00Added an answer on May 29, 2026 at 9:55 am

    Well you’ll need to re-compile your libs for ARM first. You can use the ndk’s “standalone toolchain” functionality for that. There’s a doc explaining more about it in the ndk dir (docs/STANDALONE-TOOLCHAIN.html). I needed to use libexpat in a project so I whipped up a bash file to compile expat using the standalone toolchain like so:

    NDK_PATH=/android-ndk-r7
    NDK_GCC=${NDK_PATH}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc
    
    export CC="${NDK_GCC} --sysroot=${NDK_PATH}/platforms/android-8/arch-arm"
    export CFLAGS='-mthumb'
    export LDFLAGS='-Wl,--fix-cortex-a8'
    ./configure --host=arm-eabi
    make
    

    Then you can copy the so wherever you want and reference it from Android.mk:

    LOCAL_LDLIBS := \
    -Lvendor/expat/sdk/lib/android \
    -lexpat
    

    Note that I built expat and linked it statically so I didn’t have to worry about copying the resulting so

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

Sidebar

Related Questions

We have many projects that use a common base of shared components (dlls). Currently
I have projects A and B. Both projects use component C (a graphical library
I have 3 projects in my solution that I want to deploy. Is there
I have 3 tables: projects, skills and project_skills. In projects table i hold project's
Problem domain We have Projects and Milestones Once created, a Milestone has a Project
I have 2 projects in my solution: Assembly (Basic Library) Test Assembly (NUnit) I
I have 3 projects in my solution: 1) A silverlight Application Project 2) ASP.Net
If I have projects that are deployed by copying files (executables, dll's and data
For example, I have projects Child1, Child2, ChildN and Parent. I want to be
I have two projects, A and B Project A is compiled with: 1. Standard

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.