Skip to content Skip to sidebar Skip to footer

C++ Regex Not Working In Android Ndk

I have the following piece of code #include struct Confs{ std::string regexp; }; class foo { public: static int search(const std::string& phrase); s

Solution 1:

Standard C++ Library is not supported fully in Google's Android NDK, in particular things related to locales, wide characters and regular expressions. This is known fact for years, even though with time it become better; unfortunately, not so quickly as developers need. So your example don't work exactly because of poor support of C++ in Android NDK.

Answer : use CrystaX NDK or modify your code to fit limitations of Google's NDK.

P.S. I've just built your example with CrystaX NDK and it works as expected.

Solution 2:

Try the open source free regex matcher (here). Its tiny, cross platform, extremely fast, and does not have any dependencies. Just copy the files into your source and you are ready to go

Post a Comment for "C++ Regex Not Working In Android Ndk"