Many years ago I used to build gdk-pixbuf and I’ve just needed to return to it (except using more up-to-date code).
Back in the good old days, it was possible to build as a DLL (using MSVC) simply through having _MSC_VER defined (which in turn defined _GDK_PIXBUF_EXTERN). Admittedly the version of gdk-pixbuf here looks like it’s a cut-down version but the above defines don’t seem to exist any more (and therefore nothing gets exported when building as a DLL).
Whoever cut the version down, have they maybe cut out too much? Or is some other mechanism used these days? Or is gdk-pixbuf just not buildable as a DLL any more? (not using MSVC anyway…)
Thanks @ebassi - in that case, do you happen to know the current status of MSVC support? It was mostly the inclusion of __declspec() which allowed gdk-pixbuf stuff to get exported or imported from a DLL. Has it been removed in the newer versions?
No, gdk-pixbuf still works perfectly fine with MSVC: we test it as part of GTK’s CI pipeline, and just to be on the safe side, I just added a CI job to gdk-pixbuf itself for MSVC builds.
Of course, we only test the gdk-pixbuf build system: if you are not using Meson, then you’re entirely on your own.
That makes sense @ebassi. I suspect that the “new” code I’m trying to build is in fact very old code.
I’ve looked at the two versions in a differ and there’s very little difference between them. All the __declspec() stuff is absent and some comments are different but the actual code is essentially the same.