yglukhov / nimx

GUI library
MIT License
1.1k stars 75 forks source link

Error: cannot open 'nimx/window' #258

Closed pkphilip closed 5 years ago

pkphilip commented 7 years ago

Getting this error on Linux Mint 18 while trying to compile the simple example given below:

import nimx.window
import nimx.text_field
import nimx.system_logger # Required because of Nim bug (#4433)

proc startApp() =
    # First create a window. Window is the root of view hierarchy.
    var wnd = newWindow(newRect(40, 40, 800, 600))

    # Create a static text field and add it to view hierarchy
    let label = newLabel(newRect(20, 20, 150, 20))
    label.text = "Hello, world!"
    wnd.addSubview(label)

runApplication:
    startApp()

To be clear: I am using Nim version 0.17.0

AjBreidenbach commented 7 years ago

What do you get running nimble path nimx? It seems like some other Mint users have had problems with nimble https://github.com/nim-lang/nimble/issues/220

pkphilip commented 7 years ago

I have nim installed in a local directory and I have the nim/bin directory in my path.

When I run nimble path nimx, I get the following message: Warning: File 'nakefile.nim' inside package 'nimx' is outside of the permitted namespace, should be inside a directory named 'nimx' but is in a directory named 'editor' instead. This will be an error in the future. Hint: Rename the directory to 'nimx' or prevent its installation by adding skipDirs = @["editor"] to the .nimble file. /home/prem/.nimble/pkgs/nimx-0.1

I ran the following command to remove nimx: nimble remove nimx

And then I ran this command to reinstall nimx: nimble install nimx

Mnenmenth commented 6 years ago

Do you pass --threads:on to the compiler?

rknell commented 6 years ago

I was getting this and just needed to do a reinstall, looked like a nimble issue. Suggest to close