Closed abulka closed 4 years ago
I moved this issue to the NiGui repo, because it's relevant for all applications build on NiGui. There is no native macOS support yet, but with Gtk it should work. I don't have macOS and I don't know how to install Gtk there. Maybe any macOS user can help.
If it does not find the libraries, maybe the names have to be adjusted in this code block:
when defined(windows):
const libgtk3Path* = "libgtk-3-0.dll"
elif defined(gtk_quartz):
const libgtk3Path* = "libgtk-3.0.dylib"
elif defined(macosx):
const libgtk3Path* = "libgtk-x11-3.0.dylib"
else:
const libgtk3Path* = "libgtk-3.so(|.0)"
Using homebrew the gtk+3 library is installed in
/usr/local/Cellar/gtk+3/3.24.9/lib/libgtk-3.0.dylib
Somehow, NiGui seems to find it if I build with -d:gtk_quartz
as in
nim c -d:gtk_quartz -r nidraw.nim
Can confirm -d:gtk_quartz
works on macOS Catalina.
I changed the filename used on macOS to the one used for -d:gtk_quartz
: Now it should find the library without compiling with -d:gtk_quartz
. I assume the other filename is not needed.
If any problem occurs, please reopen.
Calc seemed to build ok on Mac, but couldn't run because of a missing libgtk library. Is there any solution for this?