Opengl32.dll is missing

Thank you very much for the answer in Executing application fails with code 0xc0000135 during build - #2 by native-api.
I don’t fully understand how the problem in that thread is connected to my issue.
I tried to link libgcc and libstdc++ statically, with no success however.

But running cygcheck gave me some additional insights:
cygcheck: track_down: could not find OPENGL32.dll

On Ubuntu, I can use xvfb. On Windows, there seems to be no solution yet:

By which I mean that the diagnosis steps in that post are relevant but other parts not necessarily.

ah ok… got it.

Well, in the meanwhile I figured out what’s missing (OPENGL32.dll).

I think my case is slightly different from the one I’ve quoted, since I don’t try to start a GUI.
I just need OpenGL to render into a frame buffer, which is than stored as PNG-image, but never displayed.

Do you think there is a chance to get this working?

It may be present in the Media Foundation feature available for install. Looking at metadata at my local machine, the “Microsoft-Windows-OpenGL” WinSxS component to which opengl32.dll belongs is a dependency of it.

powershell -c "Install-WindowsFeature Server-Media-Foundation"

Thanks for the suggestion, but it does not work.
Have I done wrong something?

in before_install, right after setting up MSYS2:

powershell -c "Install-WindowsFeature Server-Media-Foundation"

yields

Success Restart Needed Exit Code      Feature Result                               
------- -------------- ---------      --------------                               
True    No             Success        {Media Foundation}     

but then, same error:
cygcheck: track_down: could not find OPENGL32.dll

.travis.yml:

Then all I can suggest is to get the necessary DLLs from a Windows Server installation medium independently and copy them to %WINDIR%\System32:

The package mingw-w64-x86_64-mesa provides the OPENGL32.dll.
Installing that package solves the issue.
It’s not the same as on my local machine (which is provided by windows), but it works.

How did you go about installing this package?

I installed the package using msys package manager (pacman).
It’s a long time ago, so I could imagine a lot of dependencies (and the package itself) have changed significantly.
I haven’t used travis recently, so I cannot provide any updates, sorry.