can-lehmann / owlkettle

A declarative user interface framework based on GTK 4
https://can-lehmann.github.io/owlkettle/README
MIT License
367 stars 14 forks source link

error in Win 10 #89

Closed Martinix75 closed 8 months ago

Martinix75 commented 9 months ago

Good morning, I'm trying Owlkettle on Windows 10, but Nonn I can understand and above all to solve the following mistake. Maybe there is no qulacosa? I don't know! Thanks for your attention (on Linux it works very well).

C:\Users\Martin\Desktop>nim c test.nim
Hint: used config file 'C:\Users\Martin\scoop\apps\nim\2.0.0\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\Martin\scoop\apps\nim\2.0.0\config\config.nims' [Conf]
..............................................................................................................................................
CC: ../scoop/apps/nim/2.0.0/lib/system/exceptions.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/private/digitsutils.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/assertions.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/formatfloat.nim
CC: ../scoop/apps/nim/2.0.0/lib/system/dollars.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/exitprocs.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/syncio.nim
CC: ../scoop/apps/nim/2.0.0/lib/system.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/parseutils.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/math.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/unicode.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/strutils.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/dynlib.nim
CC: ../scoop/apps/nim/2.0.0/lib/windows/winlean.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/times.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/private/win_setenv.nim
CC: ../scoop/apps/nim/2.0.0/lib/std/cmdline.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/gtk.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/hashes.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/collections/sets.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/collections/tables.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/widgetdef.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/widgetutils.nim
CC: ../scoop/apps/nim/2.0.0/lib/pure/asyncfutures.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/widgets.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/mainloop.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle.nim
CC: ../.nimble/pkgs2/owlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8/owlkettle/dataentries.nim
CC: test.nim
Hint:  [Link]
C:/Program Files/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find Files/msys64/mingw64/bin/../lib: No such file or directory
C:/Program Files/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find Files/msys64/mingw64/bin/../lib: No such file or directory
collect2.exe: error: ld returned 1 exit status
Error: execution of an external program failed: 'gcc.exe   -o C:\Users\Martin\Desktop\test.exe  C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@ssystem@sexceptions.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@sprivate@sdigitsutils.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@sassertions.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@sformatfloat.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@ssystem@sdollars.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@sexitprocs.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@ssyncio.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@ssystem.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@sparseutils.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@smath.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@sunicode.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@sstrutils.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@sdynlib.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@swindows@swinlean.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@stimes.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@sprivate@swin_setenv.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@sstd@scmdline.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@sgtk.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@shashes.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@scollections@ssets.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@scollections@stables.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@swidgetdef.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@swidgetutils.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@sscoop@sapps@snim@s2.0.0@slib@spure@sasyncfutures.nim.c.o C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@swidgets.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle-2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@smainloop.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle.nim.c.o 
C:\Users\Martin\nimcache\test_d\@m..@s.nimble@spkgs2@sowlkettle2.2.0-1920752fd3efe5207267e351898fdcc1674d25d8@sowlkettle@sdataentries.nim.c.o C:\Users\Martin\nimcache\test_d\@mtest.nim.c.o  -L
C:/Program\ Files/msys64/mingw64/bin/../lib -lgtk-4 -lpangowin32-1.0 -lharfbuzz -lpangocairo-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgraphene-1.0 -lgio-2.0 -lglib-2.0 -lintl -lgobject-2.0 -LC:/Program\ Files/msys64/mingw64/bin/../lib -lcairo   -Wl,-Bstatic -lpthread'

I'm not a Windows fan and therefore I don't know how to use it very well, but I may need to do interfaces for that system. Thanks for any help you can give me! Bye by Martin A.

can-lehmann commented 9 months ago

It looks like GTK is not installed correctly. Did you run pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita? See this discussion for more details.

can-lehmann commented 9 months ago

You can also find more information on installing GTK on Windows here.

Martinix75 commented 9 months ago

It looks like GTK is not installed correctly. Did you run pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita? >ù< Yes, I did this! And I also inserted all (?) The variables in the system path!

After (or tomorrow at home) I look at the discussion I try on the laptop ... for now thanks!

Martinix75 commented 9 months ago

Wow !! It works, commenting on the 80 line in Cairo.nim (80) and in gtk.nim (27), and creating the Conf.Nims file as suggested. Now I just have to understand how to start the executable (double clik, without opening the console) but I am already very happy like this! Thank you by Marti A.

PhilippMDoerner commented 9 months ago

It looks like GTK is not installed correctly. Did you run pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita? See this discussion for more details.

This one actually seems like pretty valuable information for our windows folks out there. Could it make sense to link to that in the installation instruction of the nimibook or make a new section for it or sth?

Martinix75 commented 9 months ago

It looks like GTK is not installed correctly. Did you run pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-libadwaita? See this discussion for more details.

This one actually seems like pretty valuable information for our windows folks out there. Could it make sense to link to that in the installation instruction of the nimibook or make a new section for it or sth?

I would say that it is an essential information to be added to the installation instructions !! and avoid some beautiful headaches !!

can-lehmann commented 9 months ago

I believe the discussion is already linked in the cross compiling docs. They are currently not hosted though because they still have not been updated to 3.0.0.

can-lehmann commented 9 months ago

Although I was under the impression that changes to the owlkettle code should not be necessary anymore, since @RickBarretto fixed compilation on Windows in https://github.com/can-lehmann/owlkettle/pull/54.

Martinix75 commented 9 months ago

One last thing (but if you want I open a post -perch), I noticed (always with Windows), when I create an executable and then I open it with the double clik, in addition to opening the graphic interface, the console opens (cmd (cmd ??), he did the same with "pyinstaller" only that he resolved by giving a paramter (which I don't remember (-onliwindows ??) when you build the package. Is something like that here too? bye by MArtin a.

RickBarretto commented 9 months ago

One last thing (but if you want I open a post -perch), I noticed (always with Windows), when I create an executable and then I open it with the double clik, in addition to opening the graphic interface, the console opens (cmd (cmd ??), he did the same with "pyinstaller" only that he resolved by giving a paramter (which I don't remember (-onliwindows ??) when you build the package. Is something like that here too?

@Martinix75, there is a Nim compiling instruction that does that for you. Look at the Nim's Compiler User Guide:

--app:console|gui|lib|staticlib
    generate a console app|GUI app|DLL|static library
Martinix75 commented 9 months ago

@Martinix75, there is a Nim compiling instruction that does that for you. Look at the Nim's Compiler User Guide:

--app:console|gui|lib|staticlib
    generate a console app|GUI app|DLL|static library

oh my god ! It is true, and the beauty is that I had also searched for some compilation option, but I didn't see it !! I need to sleep more! thanks by Martin A.