yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

beginner's experience cannot run #379

Closed abulka closed 4 years ago

abulka commented 4 years ago

I am having trouble getting anything running on Mac, nim version 0.20.2 [MacOSX: amd64]. Initially I had to track down and understand what nake was, so it might be worth mentioning what nake is in the readme?

Firstly I tried running the nimx samples as instructed nim c -r nakefile.nim (I didn't use the nake binary invocation because I couldn't create it - see issue) I get

...
Hint: operation successful (105010 lines compiled; 6.867 sec total; 138.188MiB peakmem; Debug Build) [SuccessX]
Hint: /Users/Andy/Devel/nim_demos/nimx/nakefile  [Exec]
No task specified, running default task defined by nakefile.
/Users/Andy/.nimble/pkgs/nake-1.9.3/nake.nim(93) moduleHook
/Users/Andy/.nimble/pkgs/nake-1.9.3/nakelib.nim(252) runTask
/Users/Andy/Devel/nim_demos/nimx/nimx/naketools.nim(940) :anonymous
/Users/Andy/Devel/nim_demos/nimx/nimx/naketools.nim(293) newBuilder
/Users/Andy/Devel/nim_demos/nimx/nimx/naketools.nim(257) newBuilder
/Users/Andy/.nimble/pkgs/plists-0.1.0/plists.nim(80) loadPlist
/usr/local/Cellar/nim/0.20.2/nim/lib/pure/xmlparser.nim(146) loadXml
/usr/local/Cellar/nim/0.20.2/nim/lib/pure/xmlparser.nim(138) loadXml
Error: unhandled exception: Unable to read file: /Applications/Xcode.app/Contents/Developer/SDKs/MacOSX.sdk/SDKSettings.plist [IOError]
Error: execution of an external program failed: '/Users/Andy/Devel/nim_demos/nimx/nakefile '

Then I tried running the main example nim c -r --threads:on main.nim I get

...
Hint: font [Processing]
Hint: streams [Processing]
/Users/Andy/Devel/nim_demos/nimx/nimx/font.nim(3, 13) Error: cannot open file: nimx/types
A

Any Ideas of what I am doing wrong?

topcheese commented 4 years ago

I'm only a couple days in with learning Nim, but I'm able to build the hello world examples. I haven't tried to figure out Nake just yet, although Nimble said it was successfully installed. It was a lot easier installing SDL2 than it was GTK3.

yglukhov commented 4 years ago

This has been fixed a while ago. Please update plists and darwin dependencies like so:

rm -rf ~/.nimble/pkgs/plists-* ~/.nimble/pkgs/darwin-*
# In your nimx folder:
nimble install -dy
yglukhov commented 4 years ago

And update nimx too :)