Clang path bad "/" prefix on Windows
See original GitHub issuehttps://github.com/jbenden/vscode-c-cpp-flylint/issues/144
I noticed again that my clang is ignoring included paths and failing to find headers because the drive letter is prefixed with /
.
C:\msys64\usr\bin\clang.EXE -fsyntax-only -fno-color-diagnostics -fno-caret-diagnostics -fno-diagnostics-show-option -fdiagnostics-show-category=name -ferror-limit=200 --std=c99 -fblocks -I /c:/Users/dzidm/Repos/firmware/src/ -x c c:\Users\dzidm\Repos\firmware\src\control_api.c
Is this line needed?
https://github.com/jbenden/vscode-c-cpp-flylint/blob/a1bac0a7c1b9cf3bb913297599ad0b5442cae498/server/src/server.ts#L288-L291 When I comment it out, the /
disappears and clang works correctly.
Issue Analytics
- State:
- Created 10 months ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
[clang] Fix absolute file paths with -fdebug-prefix-map - LLVM
This change handles absolute paths, specifically in the case they are remapped to something relative, and uses the dirname for the directory ......
Read more >Clang on Windows fails to compile code - c++ - Stack Overflow
It seems that Clang on Windows generats a wrong format assemble file. But on Linux, it generats an obejct file directly instead of...
Read more >Clang, cmake & make issues when trying to build on windows
Clang, cmake & make issues when trying to build on windows ... Try using the $mingw64 prefix instead of the $msys2 prefix when...
Read more >clang-tidy 13 on Windows fails with MSVC -external:I flag
It seems wrong that it is a correct way to insert ... [3/3] Linking CXX executable bin/clang-check Original Args < Opt:<InputClass Prefixes:[] ...
Read more >R Installation and Administration
2.7.4.1 LTO with GCC; 2.7.4.2 LTO with LLVM; 2.7.4.3 LTO for package checking. 2.8 Testing an Installation. 3 Installing R under Windows.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Would you mind testing the PR #183 ? It hopefully resolves this problem…
It should now always use Windows paths, with drive letters. I additionally added unit-tests to catch more edge cases in conversion.
If we can get all file names to be proper and actual tools to run with them (ie: cppcheck and clang); I’ll be able to see why squiggles are not working. I suspect I’m storing the original filename instead of the normalized version.
Thanks so much! -Joe