Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You first need to learn about JNI (Java native Interfaces) using which you can bridge your c/c++ code with the java/android code. I have previously worked on ndk so i suggest you to do some readup from android-ndk readme. </p> <p>Requirements:</p> <p>*Download Android-ndk from Android official website.</p> <p>*Install cygwin for windows, i recommend you to use linux for development in ndk as you have a readymade terminal available there.</p> <p>*set environment variable with ndk-path.</p> <p>*Inside your Android project create a directior "<strong>jni</strong>"</p> <p>*This folder should contain all your c/c++ files. and an android makefile "Android.mk" using which the android ndk-build will compile your c/c++ program you need to use in you android application.</p> <p>*Now how to use JNI to glue your android app with your c/c++ code you can see in the videos of "Marakana for android ndk". Link for the same is given below:</p> <p><a href="http://www.google.co.in/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;cad=rja&amp;ved=0CDYQtwIwAg&amp;url=http://www.youtube.com/watch?v=YvCRlJToCAg&amp;ei=gJ0IUruKLcPSrQfIkYGoDw&amp;usg=AFQjCNG3IpyIZfS5z5HB7E2yhB40xgmdTg&amp;bvm=bv.50500085,d.bmk" rel="nofollow">Tutorial</a></p> <p>The contents of makefile for your requirements are:</p> <pre><code> LOCAL_PATH := $(call my-dir) TARGET_ARCH_ABI := armeabi-v7a include $(CLEAR_VARS) LOCAL_MODULE := gifflen LOCAL_ARM_MODE := arm LOCAL_C_INCLUDES := \./Include/ LOCAL_SRC_FILES := \./Source/dib.c \./Source/gifflen.c include $(BUILD_SHARED_LIBRARY) $(call import-module) </code></pre> <p>Under jni, put your Create a source foler and Include folder. Addyour .c/cpp files in Source directory and .h files in Include directory</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload