Skip to content

Doesn't work on Windows #28

Description

@kroppt

Three problems happen on Windows which were not a problem on Linux:

  • The output flag doesn't exist.
  • Commands in compile_commands.json don't have properly escaped backslashes, which are common for Windows paths.
  • Output compile_commands.json is missing many header files.

Before:

...
{
  "directory": "C:/Users/Greg/code/take4/build",
  "command": "C:\\Users\\Greg\\scoop\\apps\\msys2\\current\\mingw64\\bin\\c++.exe -DCHUNK_SIZE=16 -DRAY_TRACING -DRECURSION_DEPTH=4 -DREGION_SIZE=16 -DSDL_MAIN_HANDLED -DCMAKE_INTDIR=\\\"Debug\\\" -IC:/Users/Greg/code/take4 -IC:/Users/Greg/code/take4/build/_deps/libpng-src -IC:/Users/Greg/code/take4/build/_deps/libpng-build -IC:/Users/Greg/code/take4/cache -IC:/Users/Greg/code/take4/graphics -IC:/Users/Greg/code/take4/player -IC:/Users/Greg/code/take4/utils -IC:/Users/Greg/code/take4/world -IC:/Users/Greg/code/take4/build/_deps/glm-src -IC:/Users/Greg/code/take4/build/_deps/sdl-build/include -IC:/Users/Greg/code/take4/build/_deps/sdl-build/include-config-debug -IC:/Users/Greg/code/take4/build/_deps/zlib-build -IC:/Users/Greg/code/take4/build/_deps/zlib-src -isystem C:/VulkanSDK/1.3.243.0/Include -g -std=c++20 -Wall -Wextra -Werror -Winvalid-pch -include C:/Users/Greg/code/take4/build/CMakeFiles/take4.dir/Debug/cmake_pch.hxx -o CMakeFiles\\take4.dir\\Debug\\graphics\\vma.cpp.obj -c C:\\Users\\Greg\\code\\take4\\graphics\\vma.cpp",
  "file": "C:\\Users\\Greg\\code\\take4\\graphics\\vma.cpp",
  "output": "CMakeFiles\\take4.dir\\Debug\\graphics\\vma.cpp.obj"
},
...

After:

...
{
  "directory": "C:/Users/Greg/code/take4/build",
  "command": "C:UsersGregscoopappsmsys2currentmingw64binc++.exe -DCHUNK_SIZE=16 -DRAY_TRACING -DRECURSION_DEPTH=4 -DREGION_SIZE=16 -DSDL_MAIN_HANDLED -DCMAKE_INTDIR=\\\"Debug\\\" -IC:/Users/Greg/code/take4 -IC:/Users/Greg/code/take4/build/_deps/libpng-src -IC:/Users/Greg/code/take4/build/_deps/libpng-build -IC:/Users/Greg/code/take4/cache -IC:/Users/Greg/code/take4/graphics -IC:/Users/Greg/code/take4/player -IC:/Users/Greg/code/take4/utils -IC:/Users/Greg/code/take4/world -IC:/Users/Greg/code/take4/build/_deps/glm-src -IC:/Users/Greg/code/take4/build/_deps/sdl-build/include -IC:/Users/Greg/code/take4/build/_deps/sdl-build/include-config-debug -IC:/Users/Greg/code/take4/build/_deps/zlib-build -IC:/Users/Greg/code/take4/build/_deps/zlib-src -isystem C:/VulkanSDK/1.3.243.0/Include -g -std=c++20 -Wall -Wextra -Werror -Winvalid-pch -include C:/Users/Greg/code/take4/build/CMakeFiles/take4.dir/Debug/cmake_pch.hxx -o CMakeFilestake4.dirDebuggraphicsvma.cpp.obj -c C:UsersGregcodetake4graphicsvma.cpp",
  "file": "C:\\Users\\Greg\\code\\take4\\graphics\\vma.cpp",
  "output": "CMakeFiles\\take4.dir\\Debug\\graphics\\vma.cpp.obj"
},
...

You can see how the paths are messed up: C:UsersGregscoopappsmsys2currentmingw64binc++.exe.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions