OF 0.9.3: Error compiling OF on Windows

#1

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

Cross-compiling openFrameworks projects for Windows on Linux
Compiling openFrameworksCompiled fails on Windows 10
#2

Exactly the same error is here too!

Help please, I want to use OF in Win 10 :slight_smile: (too :wink: )

Ps: I tried it in several vm, like win 8, winxp :s, but the same error are everywhere! - URGENT! - thx!

#3

Hi,
Can it be related to your
./compileOF.sh
command ?
The msys2 tutorial specify to compile OF with a
make
command.

#4

I followed the tutorial correctly.
I did a simple make in the <your_oF_directory>/libs/openFrameworksCompiled/project
and the error happend some minutes later in the same point.

I did not use the ./compileOF.sh.

Now i tried the compileOF.sh too, and it gave the same error.

I attached the error, plz. help!:

C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NUM_FORMATS’ not handled in switch [-Wswitch]
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_UNKNOWN’ not handled in switch [-Wswitch]
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1011:11: warning: enumeration value ‘OF_PIXELS_NATIVE’ not handled in switch [-Wswitch]
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1009:12: warning: unused variable ‘hr’ [-Wunused-variable]
HRESULT hr = middleSample->GetPointer(&ptrBuffer);
^
In file included from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/ofMain.h:96,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofVideoPlayer.h:29,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofVideoPlayer.cpp:1:
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/videoInput/include/videoInput.h:188:12: warning: ‘comInitCount’ defined but not used [-Wunused-variable]
static int comInitCount = 0;
^
make[2]: *** [makefileCommon/compile.core.mk:239: /home/Art/of_v0.9.3_msys2_release/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofVideoPlayer.o] Error 1
make[2]: *** Waiting for unfinished jobs…
In file included from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowGrabber.h:9:0,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofVideoGrabber.h:26,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/ofMain.h:96,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.h:6,
from C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/openFrameworks/video/ofDirectShowPlayer.cpp:1:
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/videoInput/include/videoInput.h: At global scope:
C:/msys64/home/Art/of_v0.9.3_msys2_release/libs/videoInput/include/videoInput.h:188:12: warning: ‘comInitCount’ defined but not used [-Wunused-variable]
static int comInitCount = 0;
^
make[2]: *** [makefileCommon/compile.core.mk:239: /home/Art/of_v0.9.3_msys2_release/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/video/ofDirectShowPlayer.o] Error 1
make[1]: *** [makefileCommon/compile.core.mk:213: Debug] Error 2
make: *** [makefileCommon/compile.core.mk:229: all] Error 2

Art@Win8 MINGW32 ~/of_v0.9.3_msys2_release/libs/openFrameworksCompiled/project
$

Same error if i use openFrameworks-master.zip :s

#5

I’m getting exactly the same problem using make on Windows 7.

I have to say, it’s pretty discouraging not being able to compile the basic project itself using the out-of-the-box instructions.

#6

I made a thread about this same issue several days ago compileOF.sh: 'DEVPROPKEY' does not name a type

Still havnt found a solution.
I’ve switched to Visual Studio to get rolling in the meantime, but I want to use the open source stuff.

#7

I too had to switch to VS 2015 (not without moaning), as I use qtcreator for all other platforms. >:-(

VS 2015 speed is cracking me a… 8-O

#8

@vsnchips, @jmasterj et al…
I think I have the solution to this.

Include “devpropdef.h” in “setupapi.h”
(in msys2 includes “C:\msys64\mingw32\i686-w64-mingw32\include”).
Everything seems to compile fine now.

(I also noticed that I have to put oF on the c: drive since v9.)

Have fun

2 Likes
Compiling openFrameworksCompiled fails on Windows 10
#9

[SOLVED]

Include “devpropdef.h” in “setupapi.h”
(in msys2 includes “C:\msys64\mingw32\i686-w64-mingw32\include”).

That did the trick on Windows 7! Thanks :smiley:

1 Like
#10

Thanks, but I’m still having problems — that allowed the project to compile with a bunch of unused variable warnings, but when I compile the 3d example as outlined in the “Running Examples” section of the setup instructions for msys2 (http://openframeworks.cc/setup/msys2/) and double-click the resulting 3DPrimitivesExample.exe in the bin subdirectory (examples/3d/3DPrimitivesExample/), I get this error dialog:

3DPrimitivesExample.exe - Entry Point Not Found

The procedure entry point _ZNKSt6locale4nameB5cxx11Ev could not be
located in the dynamic link library libstdc++-6.dll.
#11

Hi, I had the same problem. A quick and easy (but slightly annoying) solution is to manually copy libstdc+±6.dll from msys64/mingw32/bin into your project bin. That way you ensure that your app loads the correct version of the dll. Do the same for other dll problems.
Here I’ve described how to automatically certain copy dlls for every project:

Hope that helps.

Compiling of 0.9.3 with msys2 fails on windows 7
#12

It worked under Win10 too! :slight_smile: - thanks dude!

#13

I think the problem is due to the latest release/version used in MSYS2. I did not have this problem until I wanted to do a fresh install…
My solution is to edit the ofSerial.h file and to add the #include <devpropdef.h> just before the #include <setupapi.h>.
This way you keep the solution even if you upgrade your system !

#14

I need help. I have the same problem. I already copy the dll’s at the bin directory, but the library libfreeimage-3.dll stills marking an error, therefore i copie into the directory without any solution.
The error:
The procedure entry point TIFFFieldDataType could not be located in the dynqmic link library
C:\Qt\of_v0.9.7_msys2_release\examples\3d\3DPrimitivesExample\bin\libfreeimage-3.dll