Skip to content

基础例程提示error: ShowError #119

@cers000

Description

@cers000

main.zig

const std = @import("std");
const wu = @import("webui");

pub fn main(init: std.process.Init.Minimal) !void {
    _ = init;

    var win = wu.newWindow();
    try win.show("index.html");
    wu.wait();
    std.log.info("wait之后", .{});
}
build.zig
    const zig_webui = b.dependency("zig_webui", .{
        .target = target,
        .optimize = optimize,
        .enable_tls = false, // whether enable tls support
        .is_static = true, // whether static link
    });
.{ .name = "webui", .module = zig_webui.module("webui") },

build.zig.zon

    .dependencies = .{
        .zig_webui = .{
            .url = "https://github.com/webui-dev/zig-webui/archive/main.tar.gz",
            .hash = "zig_webui-2.5.0-beta.4-M4z7zYaiAQCoeY3mDtQkPz_CC_fsFhV9aZol8UY29jPF",
        },
    },

窗口可以正常打开显示,index.html的内容也正常显示,index.html文件没什么内容,就是一个hello,但是在命令行里面提示

error: ShowError
F:\code\ziglist\testio\zig-pkg\zig_webui-2.5.0-beta.4-M4z7zYaiAQCoeY3mDtQkPz_CC_fsFhV9aZol8UY29jPF\src\webui.zig:141:19: 0x7ff75f041086 in show (testio_zcu.obj)
    if (!success) return WebUIError.ShowError;
                  ^
F:\code\ziglist\testio\src\main.zig:8:5: 0x7ff75f041194 in main (testio_zcu.obj)
    try win.show("index.html");
    ^

Windows 10 64Bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions