Just switched the toolchain to clang in and gladle.build file and now seem 
to be missing a bunch of include paths that were working previously
seems to be related to the C files only

android.ndk {
    moduleName = "NdkTest"
    toolchain = "clang"
    toolchainVersion = "3.6"

    // Generic stuff
    cppFlags += "-O2"
    cppFlags += "-frtti"
    cppFlags += "-fexceptions"
    cppFlags += "-fpermissive"
    cppFlags += "-std=gnu++11"

    cppFlags += "-DHAVE_CONFIG_H"
    cppFlags += "-DUSE_FILE32API"

    def jniPath = "src/main/jni"
    def srcPath = "-I${file(jniPath)}".toString()
    file(jniPath).eachDirRecurse { dir ->
        srcPath += "-I${file(dir)}".toString()
    }

    cppFlags += srcPath
    CFlags += srcPath

    ldLibs += ["android", "EGL","GLESv2", "dl", "log", "jpeg", "png", 
"tiff"]
    stl = "c++_static"
}

example of error:
compiling mat4.c failed.
/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/src/mat4.c:33:10:
 
fatal error: 'kazmath/utility.h' file not found
#include "kazmath/utility.h"


file is in:
/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/include/kazmath/utility.h


and the options.txt file shows the directory being included:
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/include
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/include/kazmath
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/include/kazmath/GL
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/src
-I/Users/ik/git/mobile/android/androidStudioProjects/ndkTest/ndkTest/src/main/jni/src/cocos2d/cocos2dx/kazmath/src/GL



-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to