yglukhov / nimx

GUI library
MIT License
1.09k stars 75 forks source link

Compile error (Arch linux, Newest version of nim) #346

Closed Lite5h4dow closed 5 years ago

Lite5h4dow commented 5 years ago

I get this error

../../.nimble/pkgs/ttf-0.2.9/ttf/edtaa3func.nim(481, 33) Error: undeclared identifier: 'SomeReal'

after compiling

# File: main.nim
import nimx.window
import nimx.text_field

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)

# Run the app
runApplication:
    startApp()

with nim c -r --threads:on main.nim

GammaSagittarii commented 5 years ago

You need ttf-0.2.10. The easiest way is to remove .nimble folder and install nimx with all dependencies again.

Lite5h4dow commented 5 years ago

well now i did that and im getting this

nim c --threads:on main.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: system [Processing]
Hint: main [Processing]
main.nim(2, 12) Error: cannot open file: nimx\window
GammaSagittarii commented 5 years ago

I am sorry if I was not clear enough, but you did not do what I said: remove .nimble folder (that you did do) and install nimx with all dependencies again - that means nimble install nimx. My solution is easiest for me, maybe not the most optimal. Nimble doesn't have an update function, and guessing which packages need updating because something is not working is really annoying, so I just reinstall them all. (I really wish nimble had sync function like pacman...)

yglukhov commented 5 years ago

Right. Please update https://github.com/yglukhov/ttf