How to compile a custom folder structure with ndk-build?

vgonisanz 02/29/2012. 1 answers, 1.759 views
linker android-ndk android-ndk shared-libraries

I have the next folder structure:

On $My_Eclipse_Project

  • jni/
  • jni/
  • jni/main.cpp
  • lib/

On $My_Library_Project

  • src/
  • include/

$My_Eclipse_Project/jni/main.cpp is a basic makefile whom call the source to compile, following the instructions from $My_Library_Project/

    # NOTE:
$(warning Compiling from sample_cameraview_activity)

# This path
LOCAL_PATH := $(call my-dir)
$(warning Local path: $(LOCAL_PATH))

# GNU var
include $(CLEAR_VARS)

# Include extra library
include $(mylibrary_INCLUDE)/../

# Add openCV

# Add in .bashrc enviroment var
include $(OPENCV_SHARE_MK)/


# Local libraries


# Name library

LOCAL_MODULE    := camView

# Local SRC

LOCAL_SRC_FILES := main.cpp

# Shared library


The problem is, $My_Library_Project> don't detect the folder structure what is waiting, because my source is on src folder, don't at jni folder. I get:

Android NDK: Could not find application project directory !    
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. 

How could i compile the code at $My_Library_Project from $My_Eclipse_Project, and copy the library generated on $My_Eclipse_Project>lib/armeabi, to be used by main.cpp?

Thanks in advance.

1 Answers

goe 06/06/2012.

2 Options. You can define $NDK_PROJECT_PATH = /your_ndk_path, Makefile auto detect the path and use it to compile, or add a enviroment var with name $NDK_PROJECT_PATH and value /your_ndk_path. - Download Hi-Res Songs

1 Alan Walker

Diamond Heart flac

Alan Walker. 2018. Writer: Alan Walker;Sophia Somajo;Mood Melodies;James Njie;Thomas Troelsen;Kristoffer Haugan;Edvard Normann;Anders Froen;Gunnar Greve;Yann Bargain;Victor Verpillat;Fredrik Borch Olsen.
2 Sia

I'm Still Here flac

Sia. 2018. Writer: Sia.
3 Cardi B

Taki Taki flac

Cardi B. 2018. Writer: Bava;Juan Vasquez;Vicente Saavedra;Jordan Thorpe;DJ Snake;Ozuna;Cardi B;Selena Gomez.
4 Little Mix

Woman Like Me flac

Little Mix. 2018. Writer: Nicki Minaj;Steve Mac;Ed Sheeran;Jess Glynne.
5 Halsey

Without Me flac

Halsey. 2018. Writer: Halsey;Delacey;Louis Bell;Amy Allen;Justin Timberlake;Timbaland;Scott Storch.
6 Lady Gaga

I'll Never Love Again flac

Lady Gaga. 2018. Writer: Benjamin Rice;Lady Gaga.
7 Bradley Cooper

Shallow flac

Bradley Cooper. 2018. Writer: Andrew Wyatt;Anthony Rossomando;Mark Ronson;Lady Gaga.
8 Bradley Cooper

Always Remember Us This Way flac

Bradley Cooper. 2018. Writer: Lady Gaga;Dave Cobb.
9 Kelsea Ballerini

This Feeling flac

Kelsea Ballerini. 2018. Writer: Andrew Taggart;Alex Pall;Emily Warren.
10 Mako

Rise flac

Mako. 2018. Writer: Riot Music Team;Mako;Justin Tranter.
11 Dewain Whitmore

Burn Out flac

Dewain Whitmore. 2018. Writer: Dewain Whitmore;Ilsey Juber;Emilio Behr;Martijn Garritsen.
12 Avril Lavigne

Head Above Water flac

Avril Lavigne. 2018. Writer: Stephan Moccio;Travis Clark;Avril Lavigne.
13 Khalid

Better flac

Khalid. 2018. Writer: Charlie Handsome;Jamil Chammas;Denis Kosiak;Tor Erik Hermansen;Mikkel Stoleer Eriksen;Khalid.
14 Lady Gaga

Look What I Found flac

Lady Gaga. 2018. Writer: DJ White Shadow;Nick Monson;Mark Nilan Jr;Lady Gaga.
15 Deep Chills

Run Free flac

Deep Chills. 2018.
16 Dynoro

In My Mind flac

Dynoro. 2018. Writer: Georgi Kay;Feenixpawl;Ivan Gough.
17 Charli XCX

1999 flac

Charli XCX. 2018. Writer: Charli XCX;Troye Sivan;Leland;Oscar Holter;Noonie Bao.
18 NCT 127

Regular (English Version) flac

NCT 127. 2018.
19 Lukas Graham

Love Someone flac

Lukas Graham. 2018. Writer: Don Stefano;Morten "Rissi" Ristorp;Morten "Pilo" Pilegaard;Jaramye Daniels;James Alan;David LaBrel;Lukas Forchhammer Graham.
20 Rita Ora

Let You Love Me flac

Rita Ora. 2018. Writer: Rita Ora.

Related questions

Hot questions


Popular Tags