question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clang path bad "/" prefix on Windows

See original GitHub issue

https://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:open
  • Created 10 months ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jbendencommented, Nov 20, 2022

Would you mind testing the PR #183 ? It hopefully resolves this problem…

0reactions
jbendencommented, Nov 21, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found