ארכיון תגיות: C++

Dec 04

Using SWIG

Using SWIG     SWIG – Simplified Wrapper and Interface Generator:   When writing native code in our Android project, we need to set up the “glue” code between java and C++, this “glue” code is the JNI code. I wrote This JNI Article about JNI in Android, the problem with writing JNI code is …

המשיכו בקריאה »

Dec 04

Disabling Gradle auto build in Android Studio and set to use Make Files

Disabling Gradle auto build in Android Studio and set to use Make Files     Theoretical background:     To build using a custom Android MakeFile: If you would like to use a custom android MakeFile instead of using the default compilation of Gradle, we will have to:   1. Create a custom Android.mk file …

המשיכו בקריאה »

Dec 04

Creating the android and application make files

Creating the android and application make files     Theoretical background:     Application.mk: The Application.mk is a Make File that defines general variables about how to compile your applications. For example: Which ABIs the application will build for, which toolchain and which compiler to use, what is the min android version to build to …

המשיכו בקריאה »

Dec 04

Building the Android project using Gradle

Building the Android project using Gradle         To build using Gradle: If you want to use the android NDK to build C++ code, all you have to do is: 1. In the build.gradle file add under android->defaultConfig the following element:   ndk {     moduleName "<your_module_name>"     //You can declare here other …

המשיכו בקריאה »

Dec 04

Building the Android project using Gradle or MakeFiles

Building the Android project using Gradle or MakeFiles     Theoretical Background:   The android build system uses Gradle, and it consists of an android plugin for Gradle. When we create a project a build.gradle (Module: app) file is created (under the folder app) and auto generated with the plugin: apply plugin: ‘com.android.application’ This plugin …

המשיכו בקריאה »

Sep 27

Setting Up The Test Windows Project

Setting Up The Test Windows Project   Example diagram:     Theoretical Background: In the previous articles we learned about gmock and gtest frameworks and set up the windows gmock and gtest projects. In this article we will set up the Windows test project, This project will take dependency on:   The gmock project (which …

המשיכו בקריאה »

Sep 27

Setting up the gmock Windows project

Setting up the gmock Windows project   Example diagram:     Theoretical Background:   gmock is a framework that provides an API for easily setting up mock classes, to be used by your tests. It is also developed by Google and is intended to complete the testing capabilities of gtest. (Although you can use gmock …

המשיכו בקריאה »

May 09

Android JNI

Android JNI     Theoretical Background:     JNI – Java Native Interface:   What is JNI: The JNI is a framework that enables Java code to call and be called by code written in native languages: c, c++ and Objective c.   Our App process, managed code and native code: When we run an …

המשיכו בקריאה »

May 09

Android NDK

The JVM – Java Virtual Machine     Theoretical Background:     NDK – Native Development Kit:   Is a framework that enables us to develop natively (using native c/c++ code) for Android. We need to install the NDK as it doesn’t come with the general SDK, you can find the download in: https://developer.android.com/tools/sdk/ndk/index.html   …

המשיכו בקריאה »