Salvatore Ucchino
Salvatore Ucchino

Reputation: 727

OpenCV installation on windows

I'm trying to install OpenCV on Windows and I followed the Installation by Using git-bash (version>=2.14.1) and cmake (version >=3.9.1) tutorial from the official OpenCV documentation but when I run the build operation I get an error.

I'm using:

Here's the error

In file included from C:\lib\opencv\modules\videoio\src\cap_msmf.cpp:59:0:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:77:50: error: 'MFP_MEDIAITEM_CHARACTERISTICS' has not been declared
     STDMETHOD_(HRESULT,GetCharacteristics)(THIS_ MFP_MEDIAITEM_CHARACTERISTICS *pCharacteristics) PURE;
                                                  ^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/mfplay.h:79:46: error: 'IMFPMediaPlayer' has not been declared
     STDMETHOD_(HRESULT,GetMediaPlayer)(THIS_ IMFPMediaPlayer **ppMediaPlayer) PURE;

Did someone encounter this kind of error?

Upvotes: 3

Views: 963

Answers (1)

exomo
exomo

Reputation: 71

Yes I also encountered this error (when compiling with MinGW-w64 gcc 8.1).

For you and anybody else who finds this question when this error occurs (like me), here's what solved the issue for me:

When not using Visual Studio, you have to disable some features which are not supported. Build with cmake options WITH_IPP=OFF and WITH_MSMF=OFF

Solution found on opencv answers: http://answers.opencv.org/question/192758/compile-error-when-compiling-for-windows-341-dev/

Upvotes: 3

Related Questions