ziglang/translate-c
17
126
Fork
You've already forked translate-c
37

Translate-C fails silently when including windows.h on msvc ABI #271

Closed
opened 2025年12月08日 17:14:57 +01:00 by doerrti · 1 comment

Zig version

0.16.0-dev.1484+d0ba6642b

Reproduction and Observed Behavior

This is basically #92 but the workaround mentioned here doesn't work anymore.

  1. Create repro.c
#include <windows.h>#define MIDL_INTERFACE struct
  1. Run
zig translate-c -target x86_64-windows-msvc repro.c -lc

The command fails with exit code 5.

error: the following build command failed with exit code 5: [...]

Expected Behavior

The command should succeed.

## Zig version 0.16.0-dev.1484+d0ba6642b ## Reproduction and Observed Behavior This is basically #92 but the workaround mentioned [here](https://codeberg.org/ziglang/translate-c/issues/92#issuecomment-8511720) doesn't work anymore. 1. Create `repro.c` ```c #include <windows.h> #define MIDL_INTERFACE struct ``` 2. Run ```shell zig translate-c -target x86_64-windows-msvc repro.c -lc ``` The command fails with exit code 5. ``` error: the following build command failed with exit code 5: [...] ``` ## Expected Behavior The command should succeed.
Member
Copy link

Duplicate of #257

Duplicate of #257
Sign in to join this conversation.
No Branch/Tag specified
main
update
build-runner-process
zig-0.16.x
1.0.0
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/translate-c#271
Reference in a new issue
ziglang/translate-c
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?