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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:02:32+00:00 2026-05-25T02:02:32+00:00

I am trying to pass a preprocessor define into my native code using the

  • 0

I am trying to pass a preprocessor define into my native code using the Android NDK that is dependent on build configuration. This is so that I can disable some debug native code easily by switching build configuration in eclipse.

As I understand it, preprocessor defines are added in the android.mk file using LOCAL_CFLAGS or to the Application.mk file using APP_CFLAGS, and I have both of these options working.

So, I am trying to use the ndk-build option NDK_APP_APPLICATION_MK to specify a different Application.mk in one build configuration as follows:

ndk-build NDK_APP_APPLICATION_MK=jni/ApplicationDistribution.mk

This is documented to behave as follows:

ndk-build NDK_APP_APPLICATION_MK=<file>
--> rebuild, using a specific Application.mk pointed to by
    the NDK_APP_APPLICATION_MK command-line variable.

This generates the following log:

Android NDK: Parsing xxx/jni/Application.mk

which suggests that it is still looking for the original Application.mk file.

Is this a known bug? Is there an easier way to pass preprocessor defines to native code only for certain eclipse build configurations?

thank you for your time.

  • 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-25T02:02:33+00:00Added an answer on May 25, 2026 at 2:02 am

    Documentation is wrong here – misspelled option.
    Use NDK_APPLICATION_MK instead of NDK_APP_APPLICATION_MK.

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

Sidebar

Related Questions

Trying to pass some values into an imagebutton click event, something like this: <asp:ImageButton
Does anyboy know how to pass the LastChangeNumber parameter into MSBuild? I'm trying to
I'm trying pass in a url as a paramter to my controller like this:
im trying to pass back from a user control a list of strings that
I'm trying to build for multiple targets in Xcode, to simplify the process of
Trying to pass a date to an add item with the Lists web service
Trying to pass the variable flickrurl to a PHP page with jQuery/ajax. It works
I've been through quite a number of articles on Stack Overflow that answered the
I'm looking for some guidance on stress testing BlazeDS polling channels. I've followed this
I figured when I started getting stack overflow it was time to come here

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.