Skip to content

errors on building opencv with MinGW on windows without VisualStudio #2862

@eheperson

Description

@eheperson
System information (version)
  • OpenCV => 4.2
  • Operating System / Platform => Windows 10 64 Bit
  • Compiler => MinGW64
Detailed description

I am trying build latest version openCV library via MinGW on Window10 64 bit machine without Microsoft Visual Studio. I know that is a little bit tricky method but I don't like use Microsoft build tools. I handled the errors I have encountered so far except latest one.

In addition, I checked out Microsoft VS Docs. That line confused me : " The _isnan and _isnanf functions are Microsoft-specific. ". I'm not sure if the method I use is wrong for my operating system. I also checked out openCV Docs and FAQ, I didn't find any solution for my problem.

The error I get is below :

[ 45%] Building CXX object modules/wechat_qrcode/CMakeFiles/opencv_wechat_qrcode.dir/src/binarizermgr.cpp.obj
In file included from D:\opencvInstall\test3\opencv_contrib\modules\wechat_qrcode\src\zxing/common/bitarray.hpp:15,
from D:\opencvInstall\test3\opencv_contrib\modules\wechat_qrcode\src\zxing/common/bytematrix.hpp:13,
from D:\opencvInstall\test3\opencv_contrib\modules\wechat_qrcode\src\imgsource.hpp:13,
from D:\opencvInstall\test3\opencv_contrib\modules\wechat_qrcode\src\precomp.hpp:25,
from D:\opencvInstall\test3\opencv_contrib\modules\wechat_qrcode\src\binarizermgr.cpp:7:
D:/opencvInstall/test3/opencv_contrib/modules/wechat_qrcode/src/zxing/zxing.hpp: In function 'bool zxing::isnan(float)':
D:/opencvInstall/test3/opencv_contrib/modules/wechat_qrcode/src/zxing/zxing.hpp:64:37: error: '_isnan' was not declared in this scope; did you mean 'isnan'?
64 | inline bool isnan(float v) { return _isnan(v) != 0; }
......|....................................................................^~~~~~
......|....................................................................isnan
D:/opencvInstall/test3/opencv_contrib/modules/wechat_qrcode/src/zxing/zxing.hpp: In function 'bool zxing::isnan(double)':
D:/opencvInstall/test3/opencv_contrib/modules/wechat_qrcode/src/zxing/zxing.hpp:65:38: error: '_isnan' was not declared in this scope; did you mean 'isnan'?
65 | inline bool isnan(double v) { return _isnan(v) != 0; }
......|....................................................................^~~~~~
......|....................................................................isnan
mingw32-make[2]: *** [modules\wechat_qrcode\CMakeFiles\opencv_wechat_qrcode.dir\build.make:82: modules/wechat_qrcode/CMakeFiles/opencv_wechat_qrcode.dir/src/binarizermgr.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:7468: modules/wechat_qrcode/CMakeFiles/opencv_wechat_qrcode.dir/all] Error 2

That is my first issue report on github. If there is any mistake in format so sorry.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions