Compiling openFrameworksCompiled fails on Windows 10

Hi everyone!

I’m trying to compile oF in msys2 following these instructions. I get an error when I get to compiling the openFrameworksCompiled project.

I’m primarily a Mac user so forgive me if it’s a noob question. Errors pasted below, any help would be greatly appreciated!

Seb

PS if there’s an easier way to compile oF projects for Windows without the bulk of VS, let me know!

$ make
HOST_OS=MINGW64_NT-10.0
checking pkg-config libraries: cairo zlib openssl glew
HOST_OS=MINGW64_NT-10.0
checking pkg-config libraries: cairo zlib openssl glew
HOST_OS=MINGW64_NT-10.0
checking pkg-config libraries: cairo zlib openssl glew
cat: /c/of_v0.9.8_msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/.compiler_flags: No such file or directory
Compiling /c/of_v0.9.8_msys2/libs/openFrameworks/3d/of3dPrimitives.cpp
/mingw32/bin/g++ -g3 -std=gnu++14 -DUNICODE -D_UNICODE -Wall -fexceptions -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/of_v0.9.8_msys2/libs/fmodex/include -I/c/of_v0.9.8_msys2/libs/glfw/include -I/c/of_v0.9.8_msys2/libs/glfw/include/GLFW -I/c/of_v0.9.8_msys2/libs/glu/include -I/c/of_v0.9.8_msys2/libs/rtAudio/include -I/c/of_v0.9.8_msys2/libs/tess2/include -I/c/of_v0.9.8_msys2/libs/utf8cpp/include -I/c/of_v0.9.8_msys2/libs/utf8cpp/include/utf8 -I/c/of_v0.9.8_msys2/libs/videoInput/include -I/c/of_v0.9.8_msys2/libs/openFrameworks -I/c/of_v0.9.8_msys2/libs/openFrameworks/3d -I/c/of_v0.9.8_msys2/libs/openFrameworks/app -I/c/of_v0.9.8_msys2/libs/openFrameworks/communication -I/c/of_v0.9.8_msys2/libs/openFrameworks/events -I/c/of_v0.9.8_msys2/libs/openFrameworks/gl -I/c/of_v0.9.8_msys2/libs/openFrameworks/graphics -I/c/of_v0.9.8_msys2/libs/openFrameworks/math -I/c/of_v0.9.8_msys2/libs/openFrameworks/sound -I/c/of_v0.9.8_msys2/libs/openFrameworks/types -I/c/of_v0.9.8_msys2/libs/openFrameworks/utils -I/c/of_v0.9.8_msys2/libs/openFrameworks/video -DDEBUG -MMD -MP -MF /c/of_v0.9.8_msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.d -MT/c/of_v0.9.8_msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o -o /c/of_v0.9.8_msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o -c /c/of_v0.9.8_msys2/libs/openFrameworks/3d/of3dPrimitives.cpp

make[2]: *** [makefileCommon/compile.core.mk:241: /c/of_v0.9.8_msys2/libs/openFrameworksCompiled/lib/msys2/obj/Debug/libs/openFrameworks/3d/of3dPrimitives.o] Error 1
make[1]: *** [makefileCommon/compile.core.mk:213: Debug] Error 2
make: *** [makefileCommon/compile.core.mk:229: all] Error 2

Hi Seb,

I ran into the same issue last summer. Unfortunately I can’t remember how I got past this error.
I do remember bumping into many others using computer vision related addons like ofxCv/ofxFaceTracker/ofxFaceTracker2.

In the end, due to lack of time I just went ahead and installed visual studio community edition, made a free microsoft account and moved on. Still had ofxFaceTracker2 issues, but the build-in OF addons worked.

Sorry this isn’t the answer you were looking for, open source would’ve been nice to get going,
but if time isn’t on your side, might be worth giving VS a go as a backup plan.

Hopefully someone else more experienced can contribute an MSYS solution

Hi Seb,

Are you getting those errors with the MINGW32 shell?
Or are you compiling with the MSYS2 shell?

I’ve tried MINGW32, MINGW64, MSYS2 shell, same errors on all.

Thanks @georgeprofenza, I have a VS set up on my desktop computer so I can use that in the meantime!

Ouch :head_bandage:

I had a similar issue once, which I fixed with the solution mentioned here and more precisely this answer.

I’ll boot my windows machine, and will try to compile from scratch to see how that goes on my end.

Oh wow that did it! Thanks so much.

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

Of course now I have the problem that OpenGL doesn’t work in VirtualBox but that’s a different problem :unamused:

You’re welcome, glad it helped.

As for VirtualBox. I have no clue either. Good luck

1 Like

Just to follow up on this, I downloaded VMWare Fusion with a fresh Windows 10 Pro install, and the msys2 instructions worked perfectly, I didn’t have to do any extra stuff. And OpenGL works!

1 Like