# compile\_commands.json and absolute paths in Windows

**URL:** https://discourse.cmake.org/t/compile-commands-json-and-absolute-paths-in-windows/14257
**Category:** Usage
**Created:** [June 18, 2025, 7:06am UTC](https://discourse.cmake.org/t/compile-commands-json-and-absolute-paths-in-windows/14257 "2025-06-18T07:06:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pozz](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/838e76/32.png) [@pozz](https://discourse.cmake.org/u/pozz)
#### Post date: [June 18, 2025, 7:06am UTC](https://discourse.cmake.org/t/compile-commands-json-and-absolute-paths-in-windows/14257/1 "2025-06-18T07:06:20Z")

</div>

```auto
{
  "directory": "C:/cmake-vscode-embedded-sample/build/full-sim",
  "command": "C:\\mingw64\\bin\\gcc.exe -DCONFIG_FULL -DDEBUG -DPRINT_INTRO @CMakeFiles/hello.dir/includes_C.rsp -g3 -Wmissing-declarations -Wextra -Wall -Wlogical-op -Wjump-misses-init -Wno-missing-field-initializers -Wmaybe-uninitialized -Wuninitialized -Wundef -Wbad-function-cast -Wcast-align -Wcast-qual -Wfloat-equal -Wformat=2 -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wsequence-point -Wshadow -Wstrict-prototypes -Wswitch -Wunreachable-code -Wunused-but-set-parameter -Wwrite-strings -std=gnu11 -g3 -funsigned-char -pedantic -o CMakeFiles\\hello.dir\\src\\main.c.obj -c C:\\cmake-vscode-embedded-sample\\src\\main.c",
  "file": "C:/cmake-vscode-embedded-sample/src/main.c",
  "output": "CMakeFiles/hello.dir/src/main.c.obj"
},

```

Is it normal to have paths with slash and not backslash? I’m using cmake.exe 4.0.3 installed from [here](https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-windows-x86_64.zip) (native Windows).

For me it’s just fine, but some native Windows tools could complain.

---

<div class="post-metadata">

### Author: ![ClausKlein](https://discourse.cmake.org/user_avatar/discourse.cmake.org/clausklein/32/352_2.png) [@ClausKlein](https://discourse.cmake.org/u/ClausKlein)
#### Post date: [June 18, 2025, 1:54pm UTC](https://discourse.cmake.org/t/compile-commands-json-and-absolute-paths-in-windows/14257/2 "2025-06-18T13:54:11Z")

</div>

see [The compile\_commands.json is not usable with run-clang-tidy](https://discourse.cmake.org/t/the-compile-commands-json-is-not-usable-with-run-clang-tidy/13565)
