Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win10 vlang V 0.4.2 5b1b2cc fails to compile #9

Open
osascruz opened this issue Oct 18, 2023 · 3 comments
Open

win10 vlang V 0.4.2 5b1b2cc fails to compile #9

osascruz opened this issue Oct 18, 2023 · 3 comments

Comments

@osascruz
Copy link

great project !
I am trying to learn v.
the v . gives me all bunch of errors, maybe I am doing something wrong. or should I use an older version of vlang ?
Thanks !

@spytheman
Copy link
Contributor

Can you share the errors?

@osascruz
Copy link
Author

maybe I am too confused what I should do, I used the release 0.014 [vide_windows.zip]
The src directory content is different compare to the main branch .
there is a "hc" directory which is imported by src/*.v (ide.v, v_install.v , .., vpm_list.v)
from the root directory , a " v . " returns

Regarding iui :
C:/Users/Admin/.vmodules/iui/src/button.v:13:2: notice: uninitialized fnstruct fields are not allowed, since they can result in segfaults; use?fnor[required]or initialize the field with=(if you absolutely want to have unsafe function pointers, use= unsafe { nil }) 11 | app &Window 12 | icon int 13 | old_click_fn fn (voidptr, voidptr, voidptr) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14 | need_pack bool 15 | extra string C:/Users/Admin/.vmodules/iui/src/hyperlink.v:11:2: notice: uninitialized fnstruct fields are not allowed, since they can result in segfaults; use?fnor[required]or initialize the field with=(if you absolutely want to have unsafe function pointers, use= unsafe { nil }) 9 | pub mut: 10 | text string 11 | click_event_fn fn (voidptr) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12 | in_modal bool 13 | need_pack bool C:/Users/Admin/.vmodules/iui/src/menu.v:20:2: notice: uninitialized fnstruct fields are not allowed, since they can result in segfaults; use?fnor[required]or initialize the field with=(if you absolutely want to have unsafe function pointers, use= unsafe { nil }) 18 | open_width int 19 | sub u8 20 | click_event_fn fn (mut Window, MenuItem) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 21 | win_nat voidptr 22 | }

[....]

regarding the Vide files :

src/menus.v:132:30: notice: accessing a pointer map value requires an or {}block outsideunsafe130 | vbox.set_pos(50, 16) 131 | 132 | logo := &gg.Image(win.id_map['vide_logo']) | ~~~~~~~~~~~~~ 133 | mut logo_im := ui.image(win, logo) 134 | logo_im.set_bounds(4, 2, logo.width, logo.height) src/code_suggest.v:115:7: warning: functioniui.text_widthhas been deprecated; use ctx.text_width 113 | off := 8 114 | this.win.draw_bordered_rect(this.x + this.width, this.y, 115 | ui.text_width(this.win, this.text) + (2 * off), this.height, 2, this.win.theme.background, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 | this.win.theme.text_color) 117 | this.win.gg.draw_text(this.x + this.width + off, this.y, this.text, gx.TextCfg{ src/code_suggest.v:123:15: warning: functioniui.text_widthhas been deprecated; use ctx.text_width 121 | } 122 | 123 | twidth := ui.text_width(this.win, this.num.str()) / 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | this.win.gg.draw_text(this.x + (this.width / 2) - twidth, this.y, this.num.str(), 125 | gx.TextCfg{ src/ide.v:30:19: warning: functioniui.make_windowhas been deprecated; Use Window.new 28 | // Create Window 29 | 30 | mut window := ui.make_window( | ~~~~~~~~~~~~ 31 | theme: ui.get_system_theme() 32 | title: 'Vide - IDE for V' src/ide.v:64:15: warning: functioniui.tabboxhas been deprecated; Use Tabbox.new 62 | os.mkdir_all(folder) or {} 63 | 64 | mut tb := ui.tabbox(window) | ~~~~~~~~~~~~~~ 65 | tb.set_id(mut window, 'main-tabs') 66 | tb.set_bounds(0, 0, 300, 400) src/ide.v:70:17: warning: functioniui.hboxhas been deprecated; Use HBox.new() 68 | tb.draw_event_fn = on_draw 69 | 70 | mut hbox := ui.hbox(window) | ~~~~~~~~~~~~ 71 | tree := setup_tree(mut window, folder) 72 | hbox.add_child(tree) src/ide.v:115:16: warning: functioniui.split_view has been deprecated; Use SplitView.new 113 | sv.set_id(mut window, 'vermsv') 114 | 115 | mut spv := ui.split_view( | ~~~~~~~~~~~ 116 | first: tb 117 | second: sv

[.....]

I probably do something wrong, I apologize for my misunderstanding.

@pisaiah
Copy link
Owner

pisaiah commented Oct 25, 2023

I used the release 0.0.14

I've just added the 0.0.15 release, which should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants