Skip to content

zig clang failing to locate stdlib headers #16236

@danielchasehooper

Description

@danielchasehooper

Zig Version

0.11.0-dev.3395+1e7dcaa3a

Steps to Reproduce and Observed Behavior

Happens on macOS, didn't try other OS.

put this in main.c

#include<assert.h>

int main(int argc, char **argv) {
    assert(argc > 0);
    return 0;
}

These succeed

$ clang main.c
$ zig cc main.c

But this fails

$ zig clang main.c
main.c:2:9: fatal error: 'assert.h' file not found
#include<assert.h>
        ^~~~~~~~~~
1 error generated.

Expected Behavior

zig clang should work

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionNo questions on the issue tracker, please.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions