OpenCV for Android will not compile

asked 2020-09-16 11:11:11 -0500

tyoung gravatar image

I'm having trouble getting OpenCV to compile with the Android toolchain. I can compile opencv for Linux just fine with or without contribs, but when I attempt to compile using the android toolchain, using either ndk r14b or the latest ndk, without or without contribs, I get the following error:

/home/tyoung/newenv/opencv/modules/core/src/system.cpp: In function 'T cv::parseOption(const string&) [with T = unsigned int; std::string = std::basic_string<char>]': /home/tyoung/newenv/opencv/modules/core/src/system.cpp:1902:24: error: 'stoull' is not a member of 'std' size_t v = (size_t)std::stoull(valueStr); ^

This is clearly a problem where the proper c++11 stl is not being used, even though the -std=c++11 flag is set in the make command.

Any ideas on how to properly compile this up for android? Thanks!

edit retag flag offensive close merge delete