I'm in progress of porting my cocos2d-x project from win32 to android. I've been using the hash_map and it causes a lot of problems now.
I googled that I need to include it from different sources on Android NDK and win32, like this:
#ifdef __GNUC__
#include <ext/hash_map>
#else
#include <hash_map>
#endif
but still, when I compile on NDK r7b I got compilation error:
D:/Developer/Android/android-ndk-r7b/sources/cxx-stl/gnu-libstdc++/include/ext/hash_map:60:30: error: backward_warning.h: No such file or directory
It fails on including backward_warning.h file
#ifndef _GLIBCXX_PERMIT_BACKWARD_HASH
#include "backward_warning.h"
#endif
How can I solve this?
Bit of a delayed answer, but here is a solution for others that have this problem. You just need to fix the path. Edit your gnu-libstdc++/include/ext/hash_map file and make the following change. It will correctly display the build warning now instead of exiting with missing file error.
Change:
To: