Skip to content

Build error after following "Getting Started" Instructions #23

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

Open
MoonKraken opened this issue Jan 16, 2025 · 2 comments
Open

Build error after following "Getting Started" Instructions #23

MoonKraken opened this issue Jan 16, 2025 · 2 comments
Labels
question Further information is requested

Comments

@MoonKraken
Copy link

MoonKraken commented Jan 16, 2025

The following happens with zzz 0.2.0 and zig 0.13.0:

➜  htmx_zzz zig build
/Users/kenk/Documents/Code/Experiments/htmx_zzz/build.zig:44:20: error: member function expected 2 argument(s), found 1
    exe.root_module.addImport(zzz);
    ~~~~~~~~~~~~~~~^~~~~~~~~~
/Users/kenk/.zvm/0.13.0/lib/std/Build/Module.zig:250:5: note: function declared here
pub fn addImport(m: *Module, name: []const u8, module: *Module) void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@MoonKraken MoonKraken changed the title Build error using "Getting Started" Instructions Build error after following "Getting Started" Instructions Jan 16, 2025
@mookums
Copy link
Collaborator

mookums commented Jan 16, 2025

Hello!

In general with addImport, you need to also specify a name for the module such as exe.root_module.addImport("zzz", zzz);

@mookums
Copy link
Collaborator

mookums commented Jan 16, 2025

Hello!

In general with addImport, you need to also specify a name for the module such as exe.root_module.addImport("zzz", zzz);

That name that you provide in the quotes ends up being the name that you are able to use to import the module in your Zig source files.

@mookums mookums added the question Further information is requested label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants