-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.os-windowsMicrosoft WindowsMicrosoft WindowsproposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
I tried to compile an old Win32 C program with a build.zig and didn't see an obvious happy path to compile an .rc file into a .res file and add it to the build. These seem to be somewhat common in Win32 projects, so I think that if the intention is to support gradually converting Win32 C programs to Zig, being able to easily compile resource files and add them to the target should be part of that.
LLVM comes with llvm-rc, and it worked for me, but unlike windres and whatever the MSVC resource compiler is, llvm-rc doesn't run the preprocessor against the source file, so a preprocessing step with clang -E is also necessary. However, once you get a .res file out of it, it can be added to the build with addObjectFile.
codehz, jagt, saierd, squeek502, JerwuQu and 1 morecodehz and matu3ba
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.os-windowsMicrosoft WindowsMicrosoft WindowsproposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.