V doctor:
OS: windows, Microsoft Windows 11 Pro v22000 64-bit
Processor: 12 cpus, 64bit, little endian, Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
CC version: Error: exec failed (CreateProcess) with code 2: El sistema no puede encontrar el archivo especificado.
cmd: cc --version
getwd: C:\Users\------\Desktop\ui-\examples
vmodules: C:\Users\------\.vmodules
vroot: C:\v
vexe: C:\v\v.exe
vexe mtime: 2021-11-08 17:09:02
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 08667c5
Git version: git version 2.32.0.windows.2
Git vroot status: Error: fatal: not a git repository (or any of the parent directories): .git
.git/config present: false
thirdparty/tcc status: thirdparty-windows-amd64 0f5168cd
What did you do?
v -g -o vdbg cmd/v && vdbg .\webview.v
import ui
import ui.webview
struct App {
webview &webview.WebView
}
fn main() {
mut app := &App{
webview: voidptr(0)
}
window := ui.window(
width: 800
height: 100
state: voidptr(0)
title: 'V ui.webview demo'
children: [
ui.row(
// stretch: true
margin: ui.Margin{10, 10, 10, 10}
height: 100
children: [
ui.button(
text: 'Open'
width: 70
height: 100
onclick: fn (a voidptr, b voidptr) {
// println("onclick open")
webview.new_window(
url: 'https://github.com/revosw/ui/tree/master'
title: 'hello'
)
}
),
ui.button(
text: 'Navigate to google'
onclick: fn (a voidptr, b voidptr) {
// println("onclick google")
// app.webview.navigate("https://google.com")
}
),
ui.button(
text: 'Navigate to steam'
onclick: fn (a voidptr, b voidptr) {
// println("onclick steam")
// app.webview.navigate("https://steampowered.com")
}
),
ui.button(
text: 'Rig on_navigate'
onclick: fn (a voidptr, b voidptr) {
// println("onclick rig")
// app.webview.on_navigate(fn (url string) {
// exit(0)
// })
}
),
ui.button(
text: 'Run javascript'
onclick: fn (a voidptr, b voidptr) {
// println("onclick javascript")
// app.webview.exec("alert('Ran some javascript')")
}
),
]
),
]
)
ui.run(window)
}
What did you expect to see?
A webview
What did you see instead?
C:\Users\------\.vmodules\ui\webview\webview.v:5:8: warning: module 'ui' is imported but never used
3 | module webview
4 |
5 | import ui
| ~~
6 |
7 | [heap]
.\webview.v:9:6: warning: unused variable: `app`
7 |
8 | fn main() {
9 | mut app := &App{
| ~~~
10 | webview: voidptr(0)
11 | }
==================
tcc: error: file 'Version.lib' not found
...
==================
(Use `v -cg` to print the entire error message)
builder error:
==================
C error. This should never happen.
This is a compiler bug, please report it using `v bug file.v`.
https://github.com/vlang/v/issues/new/choose
You can also use #help on Discord: https://discord.gg/vlang```
V doctor:
What did you do?
v -g -o vdbg cmd/v && vdbg .\webview.vWhat did you expect to see?
A webview
What did you see instead?