Android NDK OpenCV - Invalid Arguments for substr

不想你离开。 提交于 2019-12-12 22:50:50

问题


I want to user my c++ code in a android/opencv/ndk project. When I paste the files into the jni folder and open them, the compiler gives me invalid argument errors for functions like substr or fwrite.

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

does the compiler quit for substr with:

Invalid arguments ' Candidates are: std::basic_string,std::allocator> substr(?, ?) '

I obviously doing something wrong! I'm using OpenCV 2.4.3.2 for Android and C/C++ Dev. Tools 8.1.1 for Eclipse.

来源:https://stackoverflow.com/questions/14836213/android-ndk-opencv-invalid-arguments-for-substr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!