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

  • Home
  • SEARCH
  • 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 8495475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:35:04+00:00 2026-06-10T23:35:04+00:00

I need libjpeg-turbo for android ndk. Did anyone managed to compile it as .a

  • 0

I need libjpeg-turbo for android ndk. Did anyone managed to compile it as .a (static) lib?
I have tried a few times, but it gave me a lot of errors only.

  • 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-06-10T23:35:05+00:00Added an answer on June 10, 2026 at 11:35 pm

    Install Android NDK. Following instructions were verified with r8b, older versions may have problems, I don’t know.

    Get the Android sources for libjpeg-turbo from Benjamin Gaignard:

    git clone git://git.linaro.org/people/tomgall/libjpeg-turbo/libjpeg-turbo.git -b linaro-android
    

    In the libjpeg-turbo directory created by git, edit file Android.mk: after line 70, LOCAL_MODULE := libjpeg, add the following:

    ifeq ($(notdir $(MAKECMDGOALS)),libjpeg.a)
      LOCAL_SRC_FILES +=  $(libsimd_SOURCES_DIST)
      include $(BUILD_STATIC_LIBRARY)
      include $(CLEAR_VARS)
      LOCAL_MODULE := dummy
    endif
    

    Run ndk-build:

    ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk obj/local/armeabi/libjpeg.a
    

    Profit!

    PS: You may want the armeabi-v7a version:

    ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_ABI=armeabi-v7a obj/local/armeabi-v7a/libjpeg.a
    

    Or compile for ARM, to improve performance, add to command line:

    LOCAL_ARM_MODE=arm
    

    If your target has NEON support, add to command line:

    LOCAL_ARM_NEON=true ARCH_ARM_HAVE_NEON=true
    

    UPDATE: to get it work with Android NDK r15 and later, remove all references to libcutils from Android.mk.

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

Sidebar

Related Questions

So I have managed to find another question discussing how to use the libjpeg
Need some regular expressions help. So far I have my code working to allow
Need some help... I have jasperserver 4.1 installed on my ubuntu. It runs via
Need help with a query that I wrote: I have three tables Company id
Need a list of Pcap.Net members or classes? Their website doesn't have much documentation
need a little help with this one. I have a form that I am
Need some insight on how this works I have the following piece of code
Need help for that. I have a tabbar with 2 views, A and B
I need to compile my Qt application for Windows while I am using Fedora
Need a little help with what I'm sure is fairly easy jquery I have

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.