# Recognize the \.res extension and link it as if it were an object file · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/b11170294052585ae81b9946d770f860d163da8f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: b11170294052585ae81b9946d770f860d163da8f

Requested commit: b11170294052585ae81b9946d770f860d163da8f

Commit: b11170294052585ae81b9946d770f860d163da8f

Tree: eb4b73867e878ca8706b73f27eafa21ea6ccaa98

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
Recognize the .res extension and link it as if it were an object file

.res files are compiled Windows resource files that get linked into executables/libraries. The linker knows what to do with them, but previously you had to trick Zig into thinking it was an object file (by renaming it to have the .obj extension, for example).

After this commit, the following works:

    zig build-exe main.zig resource.res

or, in build.zig:

    exe.addObjectFile("resource.res");

Closes #6488

```

## Parents

- [9684947faae674e093dda4c81d94f51b9568369e](https://git.cafe/gitcafe/zig/commit/9684947faae674e093dda4c81d94f51b9568369e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/b11170294052585ae81b9946d770f860d163da8f?format=markdown)
