When I try to compile OF via msys2 terminal on Windows 7. There is following error below, breaking the compiling process. It seems to be a problem with ofDirectShowPlayer. I installed the latest SDK for Windows to assure the system is up-to-date. Advice to solve this problem is much appreciated. Thanks!
ds-win7@ds-win7-PC MINGW32 /c/openFrameworks/scripts/msys2
$ ./compileOF.sh
HOST_OS=MINGW32_NT-6.1
checking pkg-config libraries: cairo zlib openssl glew
HOST_OS=MINGW32_NT-6.1
checking pkg-config libraries: cairo zlib openssl glew
Compiling /c/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp
/mingw32/bin/g++ -g3 -std=gnu++14 -DUNICODE -D_UNICODE -Wall -fexceptions -march=native -mtune=native -DPOCO_STATIC -mms-bitfields -IC:/msys64/mingw32/include/cairo -IC:/msys64/mingw32/include/pixman-1 -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/freetype2 -IC:/msys64/mingw32/include/libpng16 -IC:/msys64/mingw32/include/harfbuzz -IC:/msys64/mingw32/include/glib-2.0 -IC:/msys64/mingw32/lib/glib-2.0/include -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/freetype2 -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/harfbuzz -IC:/msys64/mingw32/include/glib-2.0 -IC:/msys64/mingw32/lib/glib-2.0/include -IC:/msys64/mingw32/include -IC:/msys64/mingw32/include/libpng16 -IC:/msys64/mingw32/include -I/c/openFrameworks/libs/fmodex/include -I/c/openFrameworks/libs/glfw/include -I/c/openFrameworks/libs/glfw/include/GLFW -I/c/openFrameworks/libs/glu/include -I/c/openFrameworks/libs/rtAudio/include -I/c/openFrameworks/libs/tess2/include -I/c/openFrameworks/libs/utf8cpp/include -I/c/openFrameworks/libs/utf8cpp/include/utf8 -I/c/openFrameworks/libs/videoInput/include -I/c/openFrameworks/libs/ope nFrameworks -I/c/openFrameworks/libs/openFrameworks/3d -I/c/openFrameworks/libs/openFrameworks/app -I/c/openFrameworks/libs/openFrameworks/communication -I/c/openFrameworks/libs/openFrameworks/events -I/c/openFrameworks/libs/openFrameworks/gl -I/c/openFrameworks/libs/openFrameworks/graphics -I/c/openFrameworks/libs/openFrameworks/math -I/c/openFrameworks/libs/openFrameworks/sound -I/c/openFrameworks/libs/openFrameworks/types -I/c/openFrameworks/libs/openFrameworks/utils -I/c/openFrameworks/libs/openFrameworks/video -DDEBUG -MMD -MP -MF /c/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofDirectShowPlayer.d -MT/c/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofDirectShowPlayer.o -o /c/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofDirectShowPlayer.o -c /c/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp
In file included from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/openFrameworks/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/openFrameworks/libs/openFrameworks/ofMain.h:96,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/openFrameworks/libs/videoInput/include/videoInput.h:40:0: warning: ignoring # pragma comment [-Wunknown-pragmas]
#pragma comment(lib,“Strmiids.lib”)
^
In file included from C:/msys64/mingw32/i686-w64-mingw32/include/dshow.h:40:0,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:11:
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16503:2: warning: #warning COM interfaces layout in this header has not been verified. [-Wcpp]
#warning COM interfaces layout in this header has not been verified.
^
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16504:2: warning: #warning COM interfaces with incorrect layout may not work at all. [-Wcpp]
#warning COM interfaces with incorrect layout may not work at all.
^
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16533:2: warning: #warning COM interfaces layout in this header has not been verified. [-Wcpp]
#warning COM interfaces layout in this header has not been verified.
^
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16534:2: warning: #warning COM interfaces with incorrect layout may not work at all. [-Wcpp]
#warning COM interfaces with incorrect layout may not work at all.
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:12:0: warning : ignoring #pragma include_alias [-Wunknown-pragmas]
#pragma include_alias( “dxtrans.h”, “qedit.h” )
^
In file included from C:/openFrameworks/libs/openFrameworks/communication/ofSerial.h:14:0,
from C:/openFrameworks/libs/openFrameworks/ofMain.h:38,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/msys64/mingw32/i686-w64-mingw32/include/setupapi.h:1879:119: error: ‘DEVPROPKEY’ does not name a type
WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData, const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, DWORD Flags); ^
C:/msys64/mingw32/i686-w64-mingw32/include/setupapi.h:1879:144: error: ‘DEVPROPTYPE’ has not been declared WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyW(HDEVINFO DeviceInfoSet,PSP_DEVINFO_DATA DeviceInfoData, const DEVPROPKEY *PropertyKey, DEVPROPTYPE *PropertyType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, DWORD Flags);
^
C:/msys64/mingw32/i686-w64-mingw32/include/setupapi.h:1880:116: error: ‘DEVPROPKEY’ has not been declared
WINSETUPAPI WINBOOL WINAPI SetupDiGetDevicePropertyKeys(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DEVPROPKEY PropertyKeyArray, DWORD Property KeyCount, PDWORD RequiredPropertyKeyCount, DWORD Flags);
^
In file included from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/openFrameworks/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/openFrameworks/libs/openFrameworks/ofMain.h:96,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/openFrameworks/libs/videoInput/include/videoInput.h:324:85: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
bool setVideoSettingFilter(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false);
^
C:/openFrameworks/libs/videoInput/include/videoInput.h:325:91: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
bool setVideoSettingFilterPct(int deviceID, long Property, float pctValue, long Flags = NULL);
^
In file included from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/openFrameworks/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/openFrameworks/libs/openFrameworks/ofMain.h:96,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/openFrameworks/libs/videoInput/include/videoInput.h:328:85: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
bool setVideoSettingCamera(int deviceID, long Property, long lValue, long Flags = NULL, bool useDefaultValue = false);
^
C:/openFrameworks/libs/videoInput/include/videoInput.h:329:91: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
bool setVideoSettingCameraPct(int deviceID, long Property, float pctValue, long Flags = NULL);
^
In file included from C:/msys64/mingw32/i686-w64-mingw32/include/dshow.h:40:0,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:11:
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16505:95: note: #pragma message: Interface IAMAsyncReaderTimestampScaling has unverified layout.
C:/msys64/mingw32/i686-w64-mingw32/include/strmif.h:16535:81: note: #pragma message: Interface IAMPluginControl has unverified layout.
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp: In member function 'virtual HRESULT DirectShowVideo::SampleCB(double, IMediaSample)’:
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:417:123: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long i nt’ [-Wformat=]
printf(“ERROR: SampleCB() - buffer sizes do not match %d %d\n”, latestBufferLength, pixels.getTotalBytes());
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp: In member function ‘void DirectShowVideo::update()’:
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:702:18: warning: unused variable ‘timeoutMs’ [-Wunused-variable]
long timeoutMs = 2000;
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp: In member function ‘bool DirectShowVideo::needsRBSwap(ofPixelFormat, ofPixelFormat)’:
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:815:64: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
(srcFormat == OF_PIXELS_BGR || srcFormat == OF_PIXELS_BGRA) && (dstFormat == OF_PIXELS_RGB || dstFormat == OF_PIXELS_RGBA) ||
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp: In member function ‘void DirectShowVideo::processPixels(ofPixels&, ofPixels&)’:
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:820:8: warning: unused variable ‘format’ [-Wunused-variable]
auto format = src.getPixelFormat();
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp: In member function ‘ofPixels& DirectShowVideo::getPixels()’:
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_GRAY’ not handled in switch [-Wswitch]
switch (pixelFormat) {
^
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_GRAY_ALPHA’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_RGB565’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NV12’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NV21’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_YV12’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_I420’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_YUY2’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_UYVY’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_Y’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_U’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_V’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_UV’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_VU’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NUM_FORMATS’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_UNKNOWN’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NATIVE’ not handled in switch [-Wswitch]
C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1009:12: warning: unused variable ‘hr’ [-Wunused-variable]
HRESULT hr = middleSample->GetPointer(&ptrBuffer);
^
In file included from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/openFrameworks/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/openFrameworks/libs/openFrameworks/ofMain.h:96,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/openFrameworks/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/openFrameworks/libs/videoInput/include/videoInput.h: At global scope:
C:/openFrameworks/libs/videoInput/include/videoInput.h:188:12: warning: ‘comInitCount’ defined but not used [-Wunused-variable]
static int comInitCount = 0;
^
make[1]: *** [makefileCommon/compile.core.mk:241: /c/openFrameworks/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofDirectShowPlayer.o] Error 1
make: *** [makefileCommon/compile.core.mk:213: Debug] Error 2
there has been a problem compiling Debug OF