Does not build on Windows 10 with latest V
Cthutu opened this issue · comments
Cthutu commented
After setting up freetype and typing v .
, I get these warnings and errors:
.\ved.v:650:7: warning: function `utf32_to_str_no_malloc` must be called from an `unsafe` block
648 | }
649 | buf := [0, 0, 0, 0, 0]
650 | s := utf32_to_str_no_malloc(code, buf) // .data)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
651 | // s := utf32_to_str(code)
652 | // println('s="$s" code="$code"')
.\ved.v:200:3: error: cannot assign to field `event_fn`: expected `fn (&gg.Event, voidptr)`, not `fn (&sapp.Event, mut Ved)`
198 | bg_color: ved.cfg.bgcolor
199 | frame_fn: frame
200 | event_fn: on_event
| ~~~~~~~~~~~~~~~~~~
201 | keydown_fn: key_down
202 | char_fn: on_char
.\ved.v:201:3: error: cannot assign to field `keydown_fn`: expected `fn (gg.KeyCode, gg.Modifier, voidptr)`, not `fn (sapp.KeyCode, sapp.Modifier, mut Ved)`
199 | frame_fn: frame
200 | event_fn: on_event
201 | keydown_fn: key_down
| ~~~~~~~~~~~~~~~~~~~~
202 | char_fn: on_char
203 | font_path: os.resource_abs_path('RobotoMono-Regular.ttf')
Alexander Medvednikov commented
fixed
Cthutu commented
Very fast!! Well done.
The errors have gone but the warning remains. But Ved seems to run, but the title bar doesn't stretch the whole width of my Ultrawide monitor. I could add that as a separate issue if you want.