On 31-07-17 19:16, Johnson Jones wrote:
how does one allow both gtk x86 and x64 to work side by side seamlessly?
I installed x64 first and it seems, because whatever is using the path
to find the gtk runtime, it looks for that first even in x86 build.
Seems like gtkd's dll resolution is not very intelligent. While I could
manually modify the path each time I switch archs, that seems pointless.
One of the problems in gtkd is that it has multiple places where it
defines libgdk-3-0.dll.
I've tried modifying gdkD so that it uses versioning properly by
searching for libgdk-3-0.dll and changing all to use an x86 or x64 when
appropriate but that doesn't seem to help. Probably have to rebuild gtkD.
Anyways, doesn't seem to be a great solution ;/ Any ideas and maybe
someone can add an issue to the github page to get this fixed? (I can't
do it for a while because of other issues).
At startup GtkD searches the Path for "libgtk-3-0.dll", when it finds
one it checks the architecture of the library. If it's the correct
architecture it calls `SetDllDirectory` so that the directory with the
correct architecture will be searched first by `LoadLibrary`.
If it's not the correct architecture it continues searching, if no
library with the correct architecture is found, we rely on `LoadLibrary`
to error out if the libraries are also not in the other locations
searched by `LoadLibrary`.
--
Mike Wey