Skip to content

Errors including Windows or macOS system headers #189

@e0328eric

Description

@e0328eric

Zig Version

0.16.0-dev.457+f90510b08

Steps to Reproduce and Observed Behavior

Here is a simple header file, saved as foo.h.

#ifndef FOO_H_
#define FOO_H_

#include <signal.h>

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif

#endif // FOO_H_

and run this command

zig translate-c -lc foo.h

On zig version 0.16.0-dev.393+dd4be26f5, translate-c works fine. However, on version 0.16.0-dev.457+f90510b08, it emits a bunch of errors.

I run this on windows intel 14900HX (so on x86_64 windows)

Expected Behavior

translate-c should work

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions