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

The Options for Conditional Compilation code snippet encounters an error #340

Closed
dierbei opened this issue Mar 13, 2024 · 2 comments
Closed

Comments

@dierbei
Copy link

dierbei commented Mar 13, 2024

The exact error message looks like the following, how do I fix this? Thanks for the help!

ref: https://ziglang.org/learn/build-system/

root@ser300462488588:~/build# zig build -Dversion=1.2.3 --summary all
/root/build/build.zig:7:17: error: expected type 'zig.CrossTarget', found 'zig.system.NativeTargetInfo'
        .target = b.host,
        ~~~~~~~~^~~~~~~~
/usr/bin/zig/lib/std/zig/system/NativeTargetInfo.zig:1:1: note: struct declared here
const std = @import("../../std.zig");
^~~~~
/usr/bin/zig/lib/std/zig/CrossTarget.zig:1:1: note: struct declared here
//! Contains all the same data as `Target`, additionally introducing the concept of "the native target".
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    runBuild__anon_6853: /usr/bin/zig/lib/std/Build.zig:1882:27
    steps__anon_6675: /usr/bin/zig/lib/build_runner.zig:969:29
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
@nektro
Copy link
Contributor

nektro commented Mar 13, 2024

please visit a Community for help :)

@dierbei
Copy link
Author

dierbei commented Mar 13, 2024

please visit a Community for help :)

Thanks for the help.

@dierbei dierbei closed this as completed Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants