mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
#include <math.h> in cv2.cpp
My build fails with the error: "C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/cmath:1136:11: error: '::hypot' has not been declared". I have tried to fix it by adding "#include <cmath>" before the line "#include <Python.h>" but then the build has failed with the error: "C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/math.h:91:12:: error: 'std::_hypot' has not been declared". Adding "#include <math.h>" allowed me to build opencv.
This commit is contained in:
parent
e06d1e8083
commit
38d73123c1
@ -4,6 +4,7 @@
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:5033) // 'register' is no longer a supported storage class
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include <Python.h>
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
|
||||
#pragma warning(pop)
|
||||
|
Loading…
Reference in New Issue
Block a user