# CMake linker show response files

**URL:** https://discourse.cmake.org/t/cmake-linker-show-response-files/4411
**Category:** Usage
**Created:** [November 3, 2021, 12:53pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411 "2021-11-03T12:53:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [November 3, 2021, 12:53pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411/1 "2021-11-03T12:53:59Z")

</div>

Hi,

I have problems on my build, and I want to investigate the linker command.  
Sadly CMake automatically uses a temporary response file (\<target.rsp\>) for linking (at least on Windows VS2019).  
The file does not exist after the build.

How can i see whats inside?

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [November 4, 2021, 9:38pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411/2 "2021-11-04T21:38:57Z")

</div>

Which Generator do you use? VS or Ninja?  
In case of Ninja you can call it with `-d keepdepfile`.

---

<div class="post-metadata">

### Author: ![buildSystemPerson](https://discourse.cmake.org/user_avatar/discourse.cmake.org/buildsystemperson/32/2851_2.png) [@buildSystemPerson](https://discourse.cmake.org/u/buildSystemPerson)
#### Post date: [November 5, 2021, 2:06pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411/3 "2021-11-05T14:06:05Z")

</div>

> [CMake linker show response files](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411)

CMake doesn’t provide a linker. This title is a bit confusing.

Have you tried building via the command line using `--verbose`?

If that doesn’t help I’d use @jtxa 's suggestion.

---

<div class="post-metadata">

### Author: ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)
#### Post date: [January 3, 2022, 4:36pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411/4 "2022-01-03T16:36:50Z")

</div>

Its always the same with this kind of errors… They are fixed before there is an answer and then i forget to look at the question.

Yes, generator is ninja, and `-d keepdepfile` looks good. I do not remember the target which had the rsp file so i cannot check.  
But now its somewhere in the internet, so I will find it next time 🙂

Btw: where are the ninja -d options documented?

@buildSystemPerson You are right, my bad. But CMake creates the response files or instructs the build tool to create (and delete) them.  
verbose just shows the linker line, where it shows the respone file but not its contents.

---

<div class="post-metadata">

### Author: ![jtxa](https://discourse.cmake.org/user_avatar/discourse.cmake.org/jtxa/32/1535_2.png) [@jtxa](https://discourse.cmake.org/u/jtxa)
#### Post date: [January 3, 2022, 8:21pm UTC](https://discourse.cmake.org/t/cmake-linker-show-response-files/4411/5 "2022-01-03T20:21:45Z")

</div>

> [@KUGA2](#):
>
> Btw: where are the ninja -d options documented?

Call `ninja -h` or directly `ninja -d list` for a short summary.  
Seems to be missing in their manual.
