Hi Iliya,
I don't see any obvious issue with your build. One thing to try is the run
the gradle command with the "-i" flag. It will give you the compiler
command that was used and you can check if the command works on its own.
Double check the options.txt you are looking at is for compiling C and not
C++. Sorry if these are obvious to you and you have already tried it.
Also, the plugin you are using seems to be quite old. Consider switching
to a newer plugin version. An unfortunate effect is that you will need to
replace += with .add(...).
Raymond
On Friday, January 8, 2016 at 2:54:32 PM UTC-8, Iliya wrote:
>
> 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.