Skip to content

example failed to run on zig 0.11.0-dev.1384+fe6dcdba1 #28

@glyh

Description

@glyh

After fixing all FileSource from .path to .source, I still can't compile this package.
I keep having this error:

examples/text_extents.zig:34:29: error: root struct of file 'cairo' has no member named 'Surface'
    var surface = try cairo.Surface.image(width, height);
                            ^~~~~~~
referenced by:
    comptime_0: /usr/lib/zig/lib/std/start.zig:59:50
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

error: text_extents...
error: The following command exited with error code 1:
/usr/lib/zig/zig build-exe /home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo/examples/text_extents.zig -lc -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -lcairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo --cache-dir /home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo/zig-cache --global-cache-dir /home/lyh/.cache/zig --name text_extents --pkg-begin cairo /home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo/src/cairo.zig --pkg-end --enable-cache 
error: the following build command failed with exit code 1:
/home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo/zig-cache/o/76add10f8da7d3a1d307aa13c08d0d49/build /usr/lib/zig/zig /home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo /home/lyh/Documents/CS/Projects/graphics/hello-cairo/deps/zig-cairo/zig-cache /home/lyh/.cache/zig text_extents

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions