Languages

Menu
Sites
Language
How can i compile native library (c++), the same way with NDK in Android?

I want to compile library HaruLib http://libharu.org/ for using in my app, but i don't know how to achive it. 

On Android we have NDK to compile c++ source code to library *.so and then using JNI to access that library in JAVA source.

I don't know how to achive it with Tizen, i would be very appreciate if have an example.

Edited by: Anh Nguyen on 06 Oct, 2013

Responses

3 Replies
youngsik yoon
overall procedure would be like below.
  • for library

1. create new project with template > library > shared library.

2. import *.h file into inc folder and *.c/cpp into src folder.

3. build setting in project > properties > c/c++ build > setting

4. build

  • for app

1. set app project to refer to library project. project > proprities > project reference.

2. set path for library header. project > properties > c/c++ build > setting > include

3. set library name for linking. project > properties > c/c++ build > setting > linker > library

4. copy .so in library project to lib folder in app project.(you can set this in "project > properties > c/c++ build > setting > build step" for automation)

5. build

Tim Uy

Dear Youngsik,

Are there instructions on compiling using command line? It would be nice if there was a shell script that set all the necessary variables (e.g., CC, CPP, CXX, RANLIB) so that a ./configure script can be run. 

Thanks in advance,

Tim

 

Tim Uy

Dear Youngsik,

Are there instructions on compiling using command line? It would be nice if there was a shell script that set all the necessary variables (e.g., CC, CPP, CXX, RANLIB) so that a ./configure script can be run. 

Thanks in advance,

Tim