Ask Your Question

Revision history [back]

Can't build OpenCV Cygwin+Mingw64

Hallo, I trying to compilate openCV frome source files, but I have a problems.

 RD fdwDetails);
   ^~~~~~~~
/usr/include/w32api/msacm.h:336:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFormatEnumA(HACMDRIVER had,LPACMFORMATDETAILSA pafd,ACMFOR
MATENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:337:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFormatEnumW(HACMDRIVER had,LPACMFORMATDETAILSW pafd,ACMFOR
MATENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:356:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFormatSuggest
   ^~~~~~~~
/usr/include/w32api/msacm.h:401:5: error: 'LPWAVEFORMATEX' does not name a type
     LPWAVEFORMATEX pwfx;
     ^~~~~~~~~~~~~~
/usr/include/w32api/msacm.h:409:5: error: 'LPWAVEFORMATEX' does not name a type
     LPWAVEFORMATEX pwfxEnum;
     ^~~~~~~~~~~~~~
/usr/include/w32api/msacm.h:420:5: error: 'LPWAVEFORMATEX' does not name a type
     LPWAVEFORMATEX pwfx;
     ^~~~~~~~~~~~~~
/usr/include/w32api/msacm.h:428:5: error: 'LPWAVEFORMATEX' does not name a type
     LPWAVEFORMATEX pwfxEnum;
     ^~~~~~~~~~~~~~
/usr/include/w32api/msacm.h:451:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFormatChooseA(LPACMFORMATCHOOSEA pafmtc);
   ^~~~~~~~
/usr/include/w32api/msacm.h:452:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFormatChooseW(LPACMFORMATCHOOSEW pafmtc);
   ^~~~~~~~
/usr/include/w32api/msacm.h:490:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterTagDetailsA(HACMDRIVER had,LPACMFILTERTAGDETAILSA pa
ftd,DWORD fdwDetails);
   ^~~~~~~~
/usr/include/w32api/msacm.h:491:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterTagDetailsW(HACMDRIVER had,LPACMFILTERTAGDETAILSW pa
ftd,DWORD fdwDetails);
   ^~~~~~~~
/usr/include/w32api/msacm.h:506:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterTagEnumA(HACMDRIVER had,LPACMFILTERTAGDETAILSA paftd
,ACMFILTERTAGENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:507:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterTagEnumW(HACMDRIVER had,LPACMFILTERTAGDETAILSW paftd
,ACMFILTERTAGENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:547:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterDetailsA(HACMDRIVER had,LPACMFILTERDETAILSA pafd,DWO
RD fdwDetails);
   ^~~~~~~~
/usr/include/w32api/msacm.h:548:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterDetailsW(HACMDRIVER had,LPACMFILTERDETAILSW pafd,DWO
RD fdwDetails);
   ^~~~~~~~
/usr/include/w32api/msacm.h:562:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterEnumA(HACMDRIVER had,LPACMFILTERDETAILSA pafd,ACMFIL
TERENUMCBA fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:563:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterEnumW(HACMDRIVER had,LPACMFILTERDETAILSW pafd,ACMFIL
TERENUMCBW fnCallback,DWORD_PTR dwInstance,DWORD fdwEnum);
   ^~~~~~~~
/usr/include/w32api/msacm.h:643:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterChooseA(LPACMFILTERCHOOSEA pafltrc);
   ^~~~~~~~
/usr/include/w32api/msacm.h:644:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmFilterChooseW(LPACMFILTERCHOOSEW pafltrc);
   ^~~~~~~~
/usr/include/w32api/msacm.h:676:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamOpen(LPHACMSTREAM phas,HACMDRIVER had,LPWAVEFORMATEX
 pwfxSrc,LPWAVEFORMATEX pwfxDst,LPWAVEFILTER pwfltr,DWORD_PTR dwCallback,DWORD_P
TR dwInstance,DWORD fdwOpen);
   ^~~~~~~~
/usr/include/w32api/msacm.h:682:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamClose
   ^~~~~~~~
/usr/include/w32api/msacm.h:685:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamSize(HACMSTREAM has,DWORD cbInput,LPDWORD pdwOutputB
ytes,DWORD fdwSize);
   ^~~~~~~~
/usr/include/w32api/msacm.h:691:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamReset(HACMSTREAM has,DWORD fdwReset);
   ^~~~~~~~
/usr/include/w32api/msacm.h:692:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamMessage(HACMSTREAM has,UINT uMsg,LPARAM lParam1,LPAR
AM lParam2);
   ^~~~~~~~
/usr/include/w32api/msacm.h:693:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamConvert(HACMSTREAM has,LPACMSTREAMHEADER pash,DWORD
fdwConvert);
   ^~~~~~~~
/usr/include/w32api/msacm.h:699:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamPrepareHeader(HACMSTREAM has,LPACMSTREAMHEADER pash,
DWORD fdwPrepare);
   ^~~~~~~~
/usr/include/w32api/msacm.h:700:3: error: 'MMRESULT' does not name a type
   MMRESULT ACMAPI acmStreamUnprepareHeader(HACMSTREAM has,LPACMSTREAMHEADER pas
h,DWORD fdwUnprepare);
   ^~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'virtual bool CvCaptureAVI_VFW::open(const char*)':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:177:38: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
                 size.width = aviinfo.rcFrame.right - aviinfo.rcFrame.left;
                                      ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:177:62: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
                 size.width = aviinfo.rcFrame.right - aviinfo.rcFrame.left;
                                                              ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:178:39: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
                 size.height = aviinfo.rcFrame.bottom - aviinfo.rcFrame.top;
                                       ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:178:64: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
                 size.height = aviinfo.rcFrame.bottom - aviinfo.rcFrame.top;
                                                                ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:181:55: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwStart'
                 film_range.start_index = (int)aviinfo.dwStart;
                                                       ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:182:78: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwLength'
                 film_range.end_index = film_range.start_index + (int)aviinfo.dw
Length;
                                                                              ^~
~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:183:39: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwRate'
                 fps = (double)aviinfo.dwRate/aviinfo.dwScale;
                                       ^~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:183:54: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwScale'
                 fps = (double)aviinfo.dwRate/aviinfo.dwScale;
                                                      ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'virtual double CvCaptureAVI_VFW::getProperty(int) const':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:262:24: error:
'const AVISTREAMINFOA {aka const struct _AVISTREAMINFOA}' has no member named 'f
ccHandler'
         return aviinfo.fccHandler;
                        ^~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: At global scop
e:
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:348:5: error: '
HIC' does not name a type
     HIC    hic;
     ^~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'void CvCaptureCAM_VFW::init()':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:359:5: error: '
hic' was not declared in this scope
     hic = 0;
     ^~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'void CvCaptureCAM_VFW::closeHIC()':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:367:9: error: '
hic' was not declared in this scope
     if( hic )
         ^~~
In file included from E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_v
fw.cpp:44:0:
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:369:9: error: '
ICSendMessage' was not declared in this scope
         ICDecompressEnd( hic );
         ^
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:370:22: error:
'ICClose' was not declared in this scope
         ICClose( hic );
                      ^
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'virtual bool CvCaptureCAM_VFW::open(int)':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:420:9: error: '
hic' was not declared in this scope
         hic = 0;
         ^~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'virtual IplImage* CvCaptureCAM_VFW::retrieveFrame(int)':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:526:13: error:
'hic' was not declared in this scope
         if( hic == 0 || fourcc != vfmt0.biCompression ||
             ^~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:531:66: error:
'ICOpen' was not declared in this scope
                           vfmt0.biCompression, ICMODE_DECOMPRESS );
                                                                  ^
In file included from E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_v
fw.cpp:44:0:
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:534:21: error:
'ICSendMessage' was not declared in this scope
                 if( ICDecompressBegin( hic, &vfmt0, &vfmt1 ) != ICERR_OK )
                     ^
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:542:14: error:
'hic' was not declared in this scope
         if( !hic || ICDecompress( hic, 0, &vfmt0, hdr->lpData,
              ^~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:543:38: error:
'ICDecompress' was not declared in this scope
             &vfmt1, frame->imageData ) != ICERR_OK )
                                      ^
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp: In member func
tion 'bool CvVideoWriter_VFW::createStreams(CvSize, bool)':
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:787:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'fccType'
     aviinfo.fccType = streamtypeVIDEO;
             ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:788:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'fccHandler'
     aviinfo.fccHandler = 0;
             ^~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:790:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwScale'
     aviinfo.dwScale = (DWORD)((double)0x7FFFFFFF / fps);
             ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:791:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwRate'
     aviinfo.dwRate = cvRound(fps * aviinfo.dwScale);
             ^~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:791:44: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'dwScale'
     aviinfo.dwRate = cvRound(fps * aviinfo.dwScale);
                                            ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:792:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
     aviinfo.rcFrame.top = aviinfo.rcFrame.left = 0;
             ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:792:35: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
     aviinfo.rcFrame.top = aviinfo.rcFrame.left = 0;
                                   ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:793:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
     aviinfo.rcFrame.right = frameSize.width;
             ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:794:13: error:
'AVISTREAMINFOA {aka struct _AVISTREAMINFOA}' has no member named 'rcFrame'
     aviinfo.rcFrame.bottom = frameSize.height;
             ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:799:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'fccType'
         copts.fccType = streamtypeVIDEO;
               ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:800:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'fccHandler'
         copts.fccHandler = fourcc != -1 ? fourcc : 0;
               ^~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:801:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'dwKeyFrameEvery'
         copts.dwKeyFrameEvery = 1;
               ^~~~~~~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:802:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'dwQuality'
         copts.dwQuality = 10000;
               ^~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:803:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'dwBytesPerSecond'
         copts.dwBytesPerSecond = 0;
               ^~~~~~~~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:804:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'dwFlags'
         copts.dwFlags = AVICOMPRESSF_VALID;
               ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:805:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'lpFormat'
         copts.lpFormat = &bmih;
               ^~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:806:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'cbFormat'
         copts.cbFormat = (isColor ? sizeof(BITMAPINFOHEADER) : sizeof(bmih));
               ^~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:807:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'lpParms'
         copts.lpParms = 0;
               ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:808:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'cbParms'
         copts.cbParms = 0;
               ^~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:809:15: error:
'struct AVICOMPRESSOPTIONS' has no member named 'dwInterleaveEvery'
         copts.dwInterleaveEvery = 0;
               ^~~~~~~~~~~~~~~~~
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:811:77: error:
cannot convert 'AVICOMPRESSOPTIONS**' to 'int*' for argument '5' to 'INT_PTR AVI
SaveOptions(HWND, UINT, int, IAVIStream**, int*)'
         if( fourcc != -1 || AVISaveOptions( 0, 0, 1, &uncompressed, &pcopts ) =
= TRUE )
                                                                             ^
E:/Programming/libs/opencv-3.3.0/modules/videoio/src/cap_vfw.cpp:817:37: error:
'struct AVICOMPRESSOPTIONS' has no member named 'fccHandler'
                 fourcc = (int)copts.fccHandler;
                                     ^~~~~~~~~~
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:189: modu
les/videoio/CMakeFiles/opencv_videoio.dir/src/cap_vfw.cpp.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:2799: modules/videoio/CMakeFiles/opencv_video
io.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

E:\Programming\libs\OpenCVrelease3.3.0>

I turned off "BUILD_ITT BUILD_IPP_IW BUILD_OPENEXR BUILD_TIFF WITH_ITT WITH_IPP_IW WITH_OPENEXR WITH_TIFF ENABLE_PRECOMPILED_HEADERS " checkbox in CMake gui, comment close(fd) line in system.cpp and change "setmode" to "_setmode" in jas_stream.c file. So, what I have to do next, co compilate openCV?

g++ 6.3.0, gcc 6.3.0, make 4.2.1, Cmake 3.9.2. Progress installation is about 42%.

P.S. Why there is no build version of openCV 3.3.0 to download?