Re: GTK+ mingw32 dynamic linking conflict (cairo/pangocairo)



Hi Jeffrey,

As far as I understand, Tarnyko's binaries are built with MSYS2, so I think the .lib files are generated (with Visual Studio's lib.exe) as a convenience to people using Visual Studio, but the things that LRN mentioned should always be taken into account when trying to use MSYS2/MinGW (or mingw-w64)-built binaries with Visual Studio builds.

Dependency Walker would be the tool that you want to use to check on which msvcrt(xx).dll (or vcruntime140.dll or so) that the binaries (with their dependencies) link to.

Since tracking down such incompatibilities can become quite hard (as it actually goes down into the CRT implementation quite a bit), probably I would want to look carefully that file descriptors/handles especially are not passed between your MSVC-built program and the MSYS2-built binaries.  Do make sure that you are using a single DLL for the same library (.lib files in this case simply points the built code to the DLL that they are tied to--so use the same GLib DLL throughout, for example, and make sure dependencies depend on those same DLLs, this may sound not so bright but can catch people off guard).

There is ongoing work to support building the GTK+ (albeit 4.x only), with its gnome.org dependencies with Meson with full support for Visual Studio, so do take a look at that, too.

It would be best if you can have a minimal sample of the code that is causing the problem for you.

With blessings, and cheers!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]