compiling this vweb example:
module main
import vweb
const (
Port = 8082
)
struct App {
pub mut:
vweb vweb.Context // TODO embed
}
fn main() {
println('Running vweb test on http://localhost:$Port')
vweb.run<App>(Port)
}
pub fn (app mut App) init() {
app.vweb.handle_static('.')
}
pub fn (app mut App) json_endpoint() {
app.vweb.json('{"a": 3}')
}
pub fn (app mut App) index() {
app.vweb.text('hello world')
}
result in this error:
panic: vweb.v:83
undefined: T
cd v/examples/vweb
v test_app.v
./test_app
Running vweb test on http://localhost:8082
Works for me.
Make sure your V is up-to-date: v up.
sorry for reopening --
okay so i think i havent updated my v yet
but after updating it now the error changed into this
.test_app.c:101:23: fatal error: curl/curl.h: No such file or directory
compilation terminated.V panic: C error. This should never happen. Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose
@pramonow Have you tried using the search: https://github.com/vlang/v/issues/1432#issuecomment-517649506 ?
libcurl dependency was removed.
@pramonow have you tried v up?
You really shouldn't be getting that error message.
@hakimio have not
@medvednikov i believed i have, i will try to clone it back and try building again later
okay after cloning it again, now it works thanks
Most helpful comment
Works for me.