I have read all the important ndk documentations to the Android.mk file and can't found informations to my problem.
Informations to the environment: WinXP(SP3), Cygwin > 1.7, Eclipse 3.6.2, Sequoyah Native Support, ndk-5c, sdk-11, ADT-11
I'll give a small illustration:
- The project itself is placed to D:/Projects/mobile/workspace/
- Boost (reduced version) is placed to D:/Projects/mobile/workspace/mesf/jni/tools
- The simple file "mesf.cpp" holds the #include and the file is placed to D:/Projects/mobile/workspace/mesf/jni/
- D:/Projects/mobile/workspace/mesf/jni/Application.mk holds the entry APP_STL := gnustl_static
- D:/Projects/mobile/workspace/mesf/jni/Android.mk holds the entry **LOCAL_CFLAGS += -I$(LOCAL_PATH)/tools/ for the boost path.**
- Without the specific boost include, it compiles successfully and the source code (as shared object) is debuggable on the target phone remotely.
- The console output after ndk-build run: ...-I/cygdrive/d/Projects/mobile/workspace/mesf/jni/tools/ -fexceptions -frtti -DBOOST_THREAD_LINUX -DBOOST_HAS_PTHREADS -D_arm_ -D_REENTRANT -D_GLIBCXX__PTHREADS -DBOOST_HAS_GETTIMEOFDAY -Wa,--noexecstack -fexceptions -frtti -O0 -g
- But if I change to LOCAL_CFLAGS += -Ijni/tools/ the #include for boost works!
- The console output after ndk-build run: **-Ijni/tools/ -fexceptions -frtti -DBOOST_THREAD_LINUX -DBOOST_HAS_PTHREADS -D_arm_ -D_REENTRANT -D_GLIBCXX__PTHREADS -DBOOST_HAS_GETTIMEOFDAY -Wa,--noexecstack -fexceptions -frtti -O0 -g **
- We can see on the consolde output that the path has changed from -I/cygdrive/d/Projects/mobile/workspace/mesf/jni/tools/ to -Ijni/tools/
The recommended method from google is LOCAL_CFLAGS += -I$(LOCAL_PATH)/tools/ (AFAIK), but it doesn't work!
My quest开发者_如何学编程ion, it's a ndk-build, cygwin or Sequoyah bug or a fault by an undefined path variable from me?
Has anybody an idea?
It was a project failure! I've setup a new project with (ndk-5c) including all source content from the old project, and now it works!
精彩评论