Skip to content
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

Doesn't work on Windows #28

Open
kroppt opened this issue Sep 24, 2023 · 0 comments
Open

Doesn't work on Windows #28

kroppt opened this issue Sep 24, 2023 · 0 comments

Comments

@kroppt
Copy link

kroppt commented Sep 24, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant