I want to reuse my native c++ files in a android project. When I paste the files into the jni folder the compiler gives me invalid argument errors for functions like substr or fwrite.
The example:
#include <string>
#include <vector>
using namespace std;
using namespace cv;
...
std::string str="We think in generalities, but we live in details.";
std::string str2 = str.substr (12,12); // "generalities"
does the compiler quit with:
Invalid arguments ' Candidates are: std::basic_string<char,std::char_traits<char>,std::allocator<char>>
substr(?, ?) '
I obviously missed something general! I'm using OpenCV 2.4.3.2 for Android and C/C++ Dev. Tools 8.1.1 for Eclipse.