Open retsyo opened 5 years ago
Thanks for reporting.
I found that gir.nim, glib.nim and gobject.nim actually GZIP files.
That is strange, I have to investigate that.
Note that GTK for Nim is not really recommended for unexperienced people and Windows users. GTK community is not very active generally, Windows users do not love GTK that much, and learning GTK today for beginners is not that easy, no book, only minimal C tutorials, no community.
For your current problem: For the initial downloading wget or nimgrab is used. I guess that for your windows wget is not available, so nimgrab is used. That one should deliver plain text files, no GZIP. I have to investigate.
No, my initial guess was wrong:
--2019-01-22 22:08:31-- https://raw.githubusercontent.com/StefanSalewski/oldgtk3/master/oldgtk3/gir.nim
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5569 (5.4K) [text/plain]
Saving to: ‘gir.nim’
It seems that you have a windows version of wget which is not working correctly, it thinks it gets plain text, but indeed requested gzip compression.
What you may do: hide your gzip is some way, so that nimgrab is used. Or find a way to tell your wget to get the files uncompressed. You can test it from shell window by commands as used in gintro.nimble like
wget https://raw.githubusercontent.com/StefanSalewski/oldgtk3/master/oldgtk3/gir.nim -O gir.nim
I updated wget, now the nim files are actually TEXT files.
USER@USER-PC MINGW64 /mingw64/bin
$ whereis libgirepository-1.0-1.dll
libgirepository-1.0-1: /mingw64/bin/libgirepository-1.0-1.dll
USER@USER-PC MINGW64 /mingw64/bin
$ export PATH=/mingw64/bin:$PATH
USER@USER-PC MINGW64 /mingw64/bin
$ nimble install gintro
gen.nim(1380, 9) Hint: 'h' is declared but not used [XDeclaredButNotUsed]
Hint: [Link]
Hint: operation successful (54401 lines compiled; 2.496 sec total; 91.625MiB peakmem; Debug Build) [SuccessX]
could not load: libgirepository-1.0-1.dll
stack trace: (most recent call last)
E:\msys64\tmp\nimble_593824\githubcom_stefansalewskigintro\gintro.nimble(75) installBefore
E:\msys64\tmp\nimble_593824\githubcom_stefansalewskigintro\gintro.nimble(63) prep
E:\msys64\home\USER\_nim\nim\lib\system\nimscript.nim(238) exec
E:\msys64\home\USER\_nim\nim\lib\system\nimscript.nim(238, 7) Error: unhandled exception: FAILED: E:\msys64\tmp\gintrosalewski\gen
You may have to restart your terminal to new Path become active? I don't know much about Windows...
At least you have to ensure that libgirepository-1.0-1.dll could be loaded, and it is not.
Araq just note that you have to ensure that your DLL matches your OS, 32 vs 64 bit issue, see
my nim and gcc are 64bits, the produced gen.exe
is for AMD64 too
the only libgirepository-1.0-1.dll is 64bits
I don't know which real Windows tools can be used except for the so said msys clusterfuck
ok, forget it, I give up to use GTK
btw, it seems that there is no many nim users on Windows
ok, forget it, I give up to use GTK
I think that is a good idea for you.
btw, it seems that there is no many nim users on Windows
No, I think there are more Windows users than Linux users, Araq itself uses Windows. But not many Nim people are doing GUI stuff at all.
I just noted that your Path definition is different as given here:
http://www.mingw.org/wiki/HOWTO_Specify_the_Location_of_Libraries_for_use_with_MinGW
$ export LIBRARY_PATH $ LIBRARY_PATH="C:/mingw/local/lib;$LIBRARY_PATH"
MSYS2 + MINGW64 on windows 7 64bits
then I found that gir.nim, glib.nim and gobject.nim actually GZIP files. If I decompress them I can do
nim c gen.nim
and getgen.exe
but what is the next step?