Skip to content
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

more clear error message when not enough --target options are provided #1169

Closed
milgov opened this Issue Jun 28, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@milgov
Copy link

milgov commented Jun 28, 2018

How I can compile in Linux for Windows?

/tmp ➤ zig build-exe --target-os windows test.zig
unable to create target based on: unknown-unknown-windows-unknown
[1]    19368 abort (core dumped)  zig build-exe --target-os windows test.zig
@bnoordhuis

This comment has been minimized.

Copy link
Member

bnoordhuis commented Jun 28, 2018

zig build-exe --target-arch x86_64 --target-os windows --target-environ msvc test.zig should do it.

@andrewrk andrewrk added this to the 0.3.0 milestone Jun 29, 2018

@andrewrk andrewrk changed the title unable to create target based on: unknown-unknown-windows-unknown more clear error message when not enough --target options are provided Jun 29, 2018

@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Jul 18, 2018

@andrewrk andrewrk closed this in 764205a Mar 1, 2019

@andrewrk

This comment has been minimized.

Copy link
Member

andrewrk commented Mar 1, 2019

[nix-shell:~/dev/zig/build]$ zig build-exe --target-os windows test.zig
Invalid argument: --target-os
See `zig --help` for detailed usage information

[nix-shell:~/dev/zig/build]$ zig build-exe -target windows test.zig
invalid target: unrecognized architecture
See `zig --help` for detailed usage information

[nix-shell:~/dev/zig/build]$ zig build-exe -target x86_64 test.zig
invalid target: missing operating system
See `zig --help` for detailed usage information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.