Peter Klaus - 2023-12-20

Im a little bit helpless at the moment. I am trying to compile sciter (a cross-platform html+css engine) with mingw. The way to build is, would be using the microsoft compiler. However i would like to build it with mingw, since my application with which i want to use the library is compiled using mingw. The premake5 script of sciter was able to generate a solution for make.
Sciter has a dependency to directshow and has some headers and source files in a subdirectory. If the files are compiled, i get many errors.
I am using MSYS2 with mingw-w64.

The first errors where (i think) simple sal.h macro errors. Things like:

__format_string, __in, __out

not being defined. I tried to solve this by simply adding them to the mingw32's sal.h. However even more undefined macros showed. Most of them seem to be defined in "amvideo.h". But this file is nowhere found, nor referenced in the source files. So even pulling it in from https://github.com/tpn/winsdk-10/blob/master/Include/10.0.14393.0/um/amvideo.h would not solve anything.
I think i am doing something completely wrong.

I also tried compiling it with both the ucrt and the mingw runtime with either mingw-w64-i686-gcc and mingw-w64-ucrt-x86_64-gcc respectively. Nothing changed.
I think it should be possible, as it seems that ffmpeg is able to compile with mingw and they even state here (https://trac.ffmpeg.org/wiki/CompilationGuide/MinGW) that mingw-w64 is well suited, since it has better compatiblity with DirectShow.
So i suppose in general it should be possible. I am just doing something really wrong here.

Does someone have an idea what the problem could be? Maybe some compiler flag, some missing include? I have attatched a partial stack trace.

Thank you very much in advance,
Peter