0

Androidプログラムのopencvのndkエラーに巻き込まれています。ImageTargets の vuforia サンプルにいくつかの opencv コードを追加したときに、以下のエラーが発生しました。そして、これらのエラーはすべて、opencv に関連する .h ファイル (core.hpp、mat.jpp など...) で発生すると思います。

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

(エラーが多すぎて、すべてをリストできませんでした)

ImageTargets.cpp に追加したのは、opencv のインクルードだけです。以下のインクルード コードを除外すると、エラーは発生しません。Androidにはopencv sdk 2.4.6を使用しています。

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

誰かがこれらのエラーの原因を知っていますか?

4

2 に答える 2

1

Application.mk の APP_STL 設定を gnustl_static に変更する必要があります。また、cmake ビルダーを Android ビルダーに変更する必要があります。

于 2015-02-17T23:00:17.120 に答える