The NDK compiles C ++ and prompts that the header file cannot be found.
Error: fstream: No such file or directory
Error: set: No such file or directory
Error: string: No such file or directory
Solution:
In the directory, create the Application. mk file and add APP_STL: = gnustl_static.
STL-related errors
1. Exception-related errors
Error: exception handling disabled, use-fexceptions to enable.
2 Some STL functions cannot be found
Undefined reference to '_ cxa_end_cleanup'
Undefined reference to '_ cxa_begin_catch'
Undefined reference to '_ cxa_end_catch'
Undefined reference to '_ cxa_get_exception_ptr'
See here: http://blog.csdn.net/andyhuabing/article/details/8591459
Dynamic library compilation is normal include $ (BUILD_SHARED_LIBRARY), change to static library, do not compile include $ (BUILD_STATIC_LIBRARY)
This is because the Application. mk file is missing.
Solution: add an Application. mk file under the <project> \ jni \ directory, which contains a line of code:
APP_MODULES: = libexample
Note: The libexample name must be the same as the LOCAL_MODULE = example name in Android. mk.