-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add support for compiling .rc files into Windows .res files #3702
Comments
For now (0.5.0+652efe38b), using addObjectFile breaks debugging in Visual Studio Code with C/C++ (ms-vscode.cpptools) extension. I am not sure why, but I'll be happy to provide any information. |
LLVM has a mostly complete RC compiler that we could port to Zig and improve compatiblity https://github.com/llvm/llvm-project/tree/master/llvm/tools/llvm-rc |
There are some free standalone editors (http://www.resedit.net/, http://angusj.com/resourcehacker/) so just being able to compile rc files will be good enough experience. |
The typical tool for this is binutils' |
I've started working on this here: https://github.com/squeek502/resinator |
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 unlikewindres
and whatever the MSVC resource compiler is,llvm-rc
doesn't run the preprocessor against the source file, so a preprocessing step withclang -E
is also necessary. However, once you get a.res
file out of it, it can be added to the build withaddObjectFile
.The text was updated successfully, but these errors were encountered: