Ask Your Question
0

Can't build OpenCV Cygwin+Mingw64 [closed]

asked 2017-09-10 13:43:12 -0500

baravunuw gravatar image

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 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2017-09-11 01:31:52.455510

Comments

there is somebuild version here for visual studio. Now never try with cygwin . Try to delete CMakeCache.txt and set all parameters WITH to OFF (uncheck everything)

LBerger gravatar imageLBerger ( 2017-09-10 13:55:44 -0500 )edit

[ 29%] Linking CXX shared library ../../bin/opencv_videoio330.dll /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lavifil32.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lavicap32.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwinmm.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmsvfw32.lib collect2: error: ld returned 1 exit status make[2]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:228: bin/ opencv_videoio330.dll] Error 1 make[1]: [CMakeFiles/Makefile2:2574: modules/videoio/CMakeFiles/opencv_video io.dir/all] Error 2 make: ** [Makefile:163: all] Error 2

baravunuw gravatar imagebaravunuw ( 2017-09-10 14:23:30 -0500 )edit

msvfw32.lib WITH_VFW is off? try to disable module video (-DBUILD_opencv_video:BOOL=OFF and videoio -DBUILD_opencv_videoio:BOOL=OFF )

Have you got this link ?

LBerger gravatar imageLBerger ( 2017-09-10 14:32:15 -0500 )edit

Yes, WITH_VFW is off. Does I have turn off ENABLE_PRECOMPILED_HEADERS too? Now is turned off.

[ 80%] Linking CXX shared library ../../bin/opencv_dnn330.dll
[ 80%] Built target opencv_dnn
make: *** [Makefile:163: all] Error 2
baravunuw gravatar imagebaravunuw ( 2017-09-10 14:45:58 -0500 )edit

yes ENABLE_PRECOMPILED_HEADERS must be off

LBerger gravatar imageLBerger ( 2017-09-10 14:51:02 -0500 )edit

ok, it was off.

baravunuw gravatar imagebaravunuw ( 2017-09-10 14:58:42 -0500 )edit

disable dnn module -DBUILD_opencv_dnn:BOOL=OFF

LBerger gravatar imageLBerger ( 2017-09-10 15:05:31 -0500 )edit

[ 72%] Building RC object modules/photo/CMakeFiles/opencv_photo.dir/vs_version.r c.obj /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lcomctl32.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lgdi32.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lole32.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lsetupapi.lib /usr/lib/gcc/x86_64-pc-cygwin/6.3.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lws2_32.lib collect2: error: ld returned 1 exit status make[2]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:147: bin/ opencv_highgui330.dll] Error 1 make[1]: * [CMakeFiles/Makefile2:1488: modules/highgui/CMakeFile

baravunuw gravatar imagebaravunuw ( 2017-09-10 15:17:10 -0500 )edit

I don't understand lwinmm.lib setupapi.lib .lib is for VS not mingw shouldn't it be .a ?

cmake generator must be -G"Unix Makefiles"

LBerger gravatar imageLBerger ( 2017-09-10 15:26:35 -0500 )edit

ok, I turned off opencv_highgui330 and it is complete. Do you know, how to fix past problems and compile complete (full) OpenCV? Now I have calib, core, features, flann, imgcodecs, imgproc, ml, objected, photo, stitching dlls.

baravunuw gravatar imagebaravunuw ( 2017-09-10 15:30:56 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-11 01:31:22 -0500

LBerger gravatar image

This link is very helpfull http://hvrl.ics.keio.ac.jp/kimura/ope...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-09-10 13:43:12 -0500

Seen: 246 times

Last updated: Sep 11 '17