Android NDK OpenCV - substr的无效参数

时间:2013-02-12 15:43:24

标签: c++ opencv android-ndk-r5

我想在android / opencv / ndk项目中使用我的c ++代码。当我将文件粘贴到jni文件夹并打开它们时,编译器为substr或fwrite等函数提供了无效的参数错误。

一个例子:

#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);   

编译器是否退出substr:

  

无效的参数'候选人是:   的std :: basic_string的,性病::分配器&GT; substr(?,?)'

我显然做错了什么!我正在使用OpenCV 2.4.3.2 for Android和C / C ++ Dev。 Eclipse的工具8.1.1。

0 个答案:

没有答案