Android NDK C++ files keep file structure -


i trying integrate c++ library i've created ios android project uses ndk build .cpp files. problem in ios, can include files using :

#include "myfile.h"  

which works fine, regardless of these files placed, provided link xcode project.

however, if place files using normal file structure, including .h not in same file requires relative url. along lines of :

#include "../myotherfolder/myotherfile.h". 

is there way mimic xcode behaviour (flat file hierarchie) using android studio? perhaps there setting / flag specified in build.gradle file?

thanks!

you can explicitly add other include directories considered android studio using cflags/cppflags.

for example:

android.ndk {     modulename = "mymodule"     //...     cppflags  += "-i${file("src/main/jni/myotherfolder")}".tostring()     //... } 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

c# - MSDN OneNote Api: Navigate to never before opened page without opening a OneNote Application Window -