I am trying to install OpenCV 3.1.0 on Ubuntu 16.10 and I'm having some problems. I've been searching for a long time on the net, but I couldn't find an answer. Can you please try to give me some suggestions?
When I run make, I get the following errors (I have deleted some similar errors):
/usr/lib/gcc/x86_64-linux-gnu/6/include/stddef.h(436): error: identifier "nullptr" is undefined
/usr/include/c++/6/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"
/usr/include/c++/6/bits/exception_ptr.h(64): error: expected a "{"
/usr/include/c++/6/bits/exception_ptr.h(71): error: namespace "std" has no member "rethrow_exception"
/usr/include/c++/6/bits/exception_ptr.h(81): error: expected a ";"
/usr/include/c++/6/bits/exception_ptr.h(88): error: declaration is incompatible with previous "std::current_exception"
(64): here
/usr/include/c++/6/bits/exception_ptr.h(88): error: use of a local type to declare a function
/usr/include/c++/6/bits/exception_ptr.h(88): error: expected a ";"
/usr/include/c++/6/bits/exception_ptr.h(89): error: use of a local type to declare a function
/usr/include/c++/6/bits/exception_ptr.h(162): error: use of a local type to declare a function
/usr/include/c++/6/type_traits(71): error: identifier "constexpr" is undefined
/usr/include/c++/6/type_traits(71): error: template parameter "_Tp" may not be redeclared in this scope
/usr/include/c++/6/type_traits(72): error: member "std::integral_constant<_Tp, __v>::_Tp" is not a type name
/usr/include/c++/6/type_traits(79): error: identifier "constexpr" is undefined
/usr/include/c++/6/type_traits(79): error: "value_type" has already been declared in the current scope
/usr/include/c++/6/type_traits(84): error: identifier "constexpr" is undefined
/usr/include/c++/6/type_traits(84): error: "_Tp" is not a function or static data member
/usr/include/c++/6/type_traits(126): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
/usr/include/c++/6/type_traits(242): error: identifier "char16_t" is undefined
/usr/include/c++/6/type_traits(246): error: identifier "char32_t" is undefined
/usr/include/c++/6/type_traits(246): error: class "std::__is_integral_helper<<error-type>>" has already been defined
/usr/include/c++/6/type_traits(344): error: identifier "__float128" is undefined
/usr/include/c++/6/type_traits(774): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
/usr/include/c++/6/type_traits(795): error: an explicit template argument list is not allowed on this declaration
/usr/include/c++/6/type_traits(795): error: expected a type specifier
/usr/include/c++/6/type_traits(795): error: function returning function is not allowed
/usr/include/c++/6/type_traits(832): error: function call is not allowed in a constant expression
/usr/include/c++/6/type_traits(832): error: this operator is not allowed in a template argument expression
/usr/include/c++/6/type_traits(843): error: an explicit template argument list is not allowed on this declaration
/usr/include/c++/6/type_traits(843): error: expected a type specifier
/usr/include/c++/6/type_traits(843): error: function returning function is not allowed
/usr/include/c++/6/type_traits(886): error: an explicit template argument list is not allowed on this declaration
And these errors seem like compile errors.