gtk arch issues(fixed)
Johnson Jones via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Aug 1 13:50:46 PDT 2017
So, The error I currently get is
object.Exception at generated\gtkd\gtkd\Loader.d(125): Library load
failed (libgdk-3-0x64.dll): is not a valid Win32 application.
and libgdk-3-0x64.dll was libgdk-3-0.dll from the 64-bit gtk
package. (I simply added the extension)... the package downloaded
from the gdk website.
The size of the file is
1.15 MB (1,211,571 bytes)
What's strange is that the file says the original name was
libgdk-win32-3.0-0.dll..
This is from the supposedly 64-bit package on the gdk website:
gtk3-runtime_3.22.4_64-bit
I extracted the files directly from that to compare and that is
what it says... so, if the dll is truly 32-bit then it would
explain it and the 64-bit runtime is not correct.
Trying the files from http://www.tarnyko.net/dl/gtk.htm still has
the same name(maybe the name is not correct... but still doesn't
work).
I've uninstalled all the gtk stuff and reinstalled using that
website(seems to be a later version?).
Eventually after setting the paths and all that I run the program
and get a different error: (note the the spelling error)
object.Error@(0): The function you are calling is not pressent in
your version of GTK+.
----------------
0x00007FF7DBE8A033 in extern (C) void
gtkd.Loader.Linker.unsupportedSymbol()
0x00007FF7DBAC28BB in gtk.Builder.Builder
gtk.Builder.Builder.__ctor(immutable(char)[])
0x00007FF7DBAC145A in D main at main.d(17)
0x00007FF7DBEF0172 in
D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv
0x00007FF7DBEF007F in void rt.dmain2._d_run_main(int, char**,
extern (C) int function(char[][])*).tryExec(scope void delegate())
0x00007FF7DBEF010C in void rt.dmain2._d_run_main(int, char**,
extern (C) int function(char[][])*).runAll()
0x00007FF7DBEF007F in void rt.dmain2._d_run_main(int, char**,
extern (C) int function(char[][])*).tryExec(scope void delegate())
0x00007FF7DBEEFF9F in d_run_main
0x00007FF7DBAC1502 in __entrypoint.main
0x00007FF7DBF6B654 in invoke_main at
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(65)
0x00007FF7DBF6B567 in __scrt_common_main_seh at
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(259)
0x00007FF7DBF6B42E in __scrt_common_main at
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl(302)
0x00007FF7DBF6B669 in mainCRTStartup at
f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp(17)
0x00007FFB8EBD2774 in BaseThreadInitThunk
0x00007FFB90050D51 in RtlUserThreadStart
now trying the the gtkd's gtk64.
woot! which works!
So, the problem is simple(but unfortunately a lot of wasted
time). gtkD needs to be updated to work well with x64 and x86. I
think all one has to do is be able to specify which path of gtk
to use rather than have it search the windows path.
While I could manually rename the dirs or create a script that
does so, that seems harsh. It would be nice if we could simply
set a path in D that gtkD attempts to use as a base path to load
the dlls.
That way, we can completely avoid windows path if necessary and
simply use d's version to set the correct path to the correct
dlls.
(or modified gtkD to work properly with both versions installed
instead of crapping out on the first instance of the dll it comes
across if it is not correct... I'd actually prefer both ways
implemented though so gtkD works better on the end user's end but
I have more control when developing).
More information about the Digitalmars-d-learn
mailing list