On Sun, Jan 16, 2022 at 10:44 AM Martin Mitáš <m...@morous.org> wrote: > > > Hello. > > I was dealing with this exact problem some time ago. > > Note the problem is wider. At certain point in time, Microsoft stopped to > care about C compatibility of (some of) their SDK headers. This includes > GDI+ and Direct2D APIs for example. > > I.e. even if you somehow make it work with mingw-w64 headers, it would still > not be buildable with MSVC. If you need that, your options are even more > limited and Wine headers won't help you much as I think their headers are > not compatible with Microsoft SDK.
It is for a toolkit that is not portable to msvc anyway. So I care only about mingw-w64 > For my projects, I've eventually ended with creating C-compatible headers > for D2D and GDI+. You can find them here: > > https://github.com/mity/c-win32 hoo, you're the author of md4c :-) I use it for this toolkit :-) I'll look at it. > However note they are not a drop-in replacement for two reasons: > > (1) They are designed to live alongside standard SDK headers: The cost of > this decision is that all their top-level identifiers differ ("c_" prefix). not a problem. Only a few functions have problems. Technically speaking, I can even replace them by something else (GetPixelSize --> size of the client region of the Windows, and GetPixelFormat, well, I use only one pixel format, so not a problem). Your license is also good. > (2) They provide only stuff I needed so they're incomplete in many ways. > That said however adding more stuff should be quite a straight-forward > exercise. i did something similar to have a dcomp C API for some functions. > So whether this is the right path forward for you, I don't know. Depends > on your trade-off considerations and requirements. thank you Vincent Torri _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public