Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Library load failed (libgtk-3-0.dll;gtk-3-3.0.dll;gtk-3.dll): The specified module could not be found" while attempting to run on Windows #359

Open
Clouud9 opened this issue Jan 22, 2025 · 3 comments

Comments

@Clouud9
Copy link

Clouud9 commented Jan 22, 2025

For some reason beyond my knowledge, GTKD seems to be unable to find the GTK Runtime's DLLs on Windows. I've tried building from source as well, but the linker gives a large number of errors saying that there are undefined symbols. Frankly I'm at the end of my tether and I've been unable to find any explanation as to why this is happening, or any potential solution to this issue.

Error Output when running dub run (Installed just through dub):

object.Exception@C:\Users<name>\AppData\Local\dub\packages\gtk-d\3.11.0\gtk-d\generated\gtkd\gtkd\Loader.d(104): Library load failed (libgtk-3-0.dll;gtk-3-3.0.dll;gtk-3.dll): The specified module could not be found.

0x00007FF7652B522D in gtkd.Loader.Linker.loadLibrary at C:\Users<name>\AppData\Local\dub\packages\gtk-d\3.11.0\gtk-d\generated\gtkd\gtkd\Loader.d(106)
0x00007FF7652B4E6D in gtkd.Loader.Linker.getSymbol at C:\Users<name>\AppData\Local\dub\packages\gtk-d\3.11.0\gtk-d\generated\gtkd\gtkd\Loader.d(65)
0x00007FF765259777 in gtkd.Loader.Linker.link!(extern (C) GType function()) at C:\Users<name>\AppData\Local\dub\packages\gtk-d\3.11.0\gtk-d\generated\gtkd\gtkd\Loader.d(47)
0x00007FF76521E654 in gtk.c.functions._sharedStaticCtor_L38_C1 at C:\Users<name>\AppData\Local\dub\packages\gtk-d\3.11.0\gtk-d\generated\gtkd\gtk\c\functions.d(43)
0x00007FF765368B18 in rt_moduleCtor
0x00007FF765366419 in int rt.sections_elf_shared.DSO.opApply(scope int delegate(ref rt.sections_elf_shared.DSO))
0x00007FF7651CCBCC in rt_init
0x00007FF7651CD51C in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll()
0x00007FF7651CD22B in d_run_main2
0x00007FF7651CD4E6 in d_wrun_main
0x00007FF7651C1ED4 in app.wmain at C:\Users<name>\Base\Programs\ldc2-1.40.0-windows-x64\import\core\internal\entrypoint.d(32)
0x00007FF76551C89A in wmainCRTStartup
0x00007FFC13F5E8D7 in BaseThreadInitThunk
0x00007FFC1605FBCC in RtlUserThreadStart
Error Program exited with code 1

@MikeWey
Copy link
Member

MikeWey commented Jan 23, 2025

Currently on Windows GtkD searches the the directories listed in the PATH environment variable for the gtk dll's. And then checks if they have the same architecture (32 vs 64 bits) as the application that is using GtkD.

@Clouud9
Copy link
Author

Clouud9 commented Jan 23, 2025

Currently on Windows GtkD searches the the directories listed in the PATH environment variable for the gtk dll's. And then checks if they have the same architecture (32 vs 64 bits) as the application that is using GtkD.

Alright I just checked it twice. Still the same issue regardless of whether I use the 32-bit or 64-bit version of the runtime. This is for the dub-installed version for the record.

@Clouud9
Copy link
Author

Clouud9 commented Feb 3, 2025

Update: Using this installer, I managed to get a simple example up and running. I'm unsure what the difference is between the runtime on the gtkd website and here, but maybe it will help. At the very least it would be useful to use the installer (if possible) on the website itself. I'll update this thread in case I run into any problems when using more advanced features. The error could maybe have also been due to the fact that I possibly installed the package before the runtime, but I'm not sure if that's exactly what caused it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants