سؤال

I'm getting involved in ndk error of opencv of android program. I got the errors below when I added some opencv code to a vuforia sample of ImageTargets. And I think all these errors occur in .h files related to opencv(core.hpp, mat.jpp, etc...)

C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2230: error: 'min' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2231: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2301: error: expected unqualified-id before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2301: error: expected ')' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2301: error: expected ';' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2304: error: expected ';' before 'Vector'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2349: error: 'std::vector' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2349: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In constructor 'cv::Vector<_Tp>::Vector(const cv::Vector<_Tp>&, const cv::Range&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2314: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'cv::Vector<_Tp>& cv::Vector<_Tp>::operator=(const cv::Vector<_Tp>&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2327: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Vector<_Tp>::copyTo(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2352: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Vector<_Tp>::addref()':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2375: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Vector<_Tp>::release()':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2378: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Vector<_Tp>::reserve(size_t)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2411: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Vector<_Tp>::resize(size_t)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2426: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2430: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2430: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'cv::Vector<_Tp>& cv::Vector<_Tp>::push_back(const _Tp&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2439: error: 'max' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Ptr<_Tp>::addref()':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2597: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::Ptr<_Tp>::release()':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2601: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'cv::Ptr<_Tp2>& cv::Ptr<_Tp>::operator=(const cv::Ptr<_Tp>&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2628: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'cv::Ptr<_Tp2> cv::Ptr<_Tp>::ptr()':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2669: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'const cv::Ptr<_Tp2> cv::Ptr<_Tp>::ptr() const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2687: error: '__gnu_cxx' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2705: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2705: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2706: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2706: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2707: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2707: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2708: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2708: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, const _Tp&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2711: error: there are no arguments to 'string' that depend on a template parameter, so a declaration of 'string' must be available
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2711: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2716: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2716: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2733: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2733: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2733: error: template-id 'write<>' for 'void cv::write(cv::FileStorage&, int)' does not match any template declaration
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2794: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2794: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2802: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2803: error: 'pt' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2807: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2807: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2807: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2809: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2810: error: 'pt' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2815: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2815: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2815: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2817: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2818: error: 'sz' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2822: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2822: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2822: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2824: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2825: error: 'c' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2829: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2829: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2829: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2831: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2832: error: 'r' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2838: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2838: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2840: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2842: error: 'v' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2845: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2845: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2845: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2847: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2848: error: 's' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2854: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2854: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2856: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2857: error: 'r' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2865: error: ISO C++ forbids declaration of 'vector' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2865: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::VecWriterProxy<_Tp, numflag>::operator()(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2867: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2878: error: ISO C++ forbids declaration of 'vector' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2878: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::VecWriterProxy<_Tp, 1>::operator()(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2882: error: there are no arguments to 'string' that depend on a template parameter, so a declaration of 'string' must be available
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2882: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2887: error: ISO C++ forbids declaration of 'vector' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2887: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2887: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2890: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2893: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2893: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2894: error: redefinition of 'template<class _Tp> void cv::write(cv::FileStorage&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2800: error: 'template<class _Tp> void cv::write(cv::FileStorage&, int)' previously declared here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::write(cv::FileStorage&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2896: error: 'name' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2897: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2900: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2900: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2901: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2901: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'cv::FileStorage& cv::operator<<(cv::FileStorage&, const _Tp&)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2909: error: 'class cv::FileStorage' has no member named 'elname'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2915: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2915: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'cv::FileStorage& cv::operator<<(cv::FileStorage&, const char*)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2918: error: 'string' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'cv::FileStorage& cv::operator<<(cv::FileStorage&, char*)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2921: error: 'string' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2999: error: 'string' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2999: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2999: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::read(const cv::FileNode&, int&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2999: error: redefinition of 'void cv::read(const cv::FileNode&, int&, int)'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:2948: error: 'void cv::read(const cv::FileNode&, int&, int)' previously defined here
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3001: error: 'default_value' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3001: error: 'string' cannot be used as a function
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3001: error: 'string' cannot be used as a function
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3025: error: expected type-specifier before 'string'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3032: error: ISO C++ forbids declaration of 'string' with no type
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3032: error: expected ',' or '...' before '&' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::FileNode::readRaw(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3034: error: 'fmt' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3034: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3034: error: 'len' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3041: error: 'vector' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3041: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::VecReaderProxy<_Tp, numflag>::operator()(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3043: error: 'count' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3043: error: 'min' is not a member of 'std'
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3044: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3055: error: 'vector' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3055: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In member function 'void cv::VecReaderProxy<_Tp, 1>::operator()(int) const':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3061: error: 'count' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3062: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3063: error: there are no arguments to 'string' that depend on a template parameter, so a declaration of 'string' must be available
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3069: error: 'vector' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3069: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::read(cv::FileNodeIterator&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3072: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3072: error: 'maxCount' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: At global scope:
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3076: error: 'vector' has not been declared
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3076: error: expected ',' or '...' before '<' token
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp: In function 'void cv::read(const cv::FileNode&, int)':
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3079: error: 'vec' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3079: error: 'default_value' was not declared in this scope
C:/Users/art/workspace/sdk2.4.6/native/jni/include/opencv2/core/operations.hpp:3083: error: 'vec' was not declared in this scope

(I have too much errors, so I could not list all of them)

All I added to ImageTargets.cpp are includes of opencv. Errors do not occur when I exclude include codes below. I use opencv sdk 2.4.6 for android.

#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/highgui/highgui.hpp>

Do someone know what causes these errors?

هل كانت مفيدة؟

المحلول

You should change the APP_STL setting in Application.mk to be gnustl_static. You should also change the cmake builder to the Android Builder.

نصائح أخرى

You should add some c++ head files .You can try to add the following files in the error reported files,such as "memory" ,"limits".

#include <memory>
#include <limits>

What difference does it make when I include <limits> or <limits.h> in my c++ code

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top