Comments (6)
And if I running
fsutil.exe file setCaseSensitiveInfo C:\test\ disable
, the problem disappears.
We do have a setting that might help with this. Can you try enabling the case sensitive file support in the C++ extension? "C_Cpp.caseSensitiveFileSupport": "enabled"
.
from vscode-cpptools.
It looks like the issue may not be with the # sign but with the file being within your D: drive. If this is a partition, then our extension may not be able to open the file correctly. As you can see, we are correctly escaping the pounds sign using "%23" to be recognized as a correct filepath.
See below example where the "#" is included in my path:
This has however revealed a bug within our Add #include feature where we do not pick up header files under a directory with the # symbol.
Could you please replicate this scenario in your C: drive?
from vscode-cpptools.
@browntarik I fixed the missing backslash in the issue report. The original text was: d:\#\cwd
, but the Markdown renderer displayed it as d:#\cwd
. Can you try again? Also try with an explicit includePath
instead of recursive includes.
@Zewbiee you can help us out by running the C/C++: Log Diagnostics
command and sharing the output with us.
from vscode-cpptools.
It looks like the issue may not be with the # sign but with the file being within your D: drive. If this is a partition, then our extension may not be able to open the file correctly. As you can see, we are correctly escaping the pounds sign using "%23" to be recognized as a correct filepath.
Could you please replicate this scenario in your C: drive?
@browntarik You are right. I cannot reproduce this problem under c:\#\cwd
.
Maybe the following steps are the real way to reproduce it:
- Create an empty folder C:\test
- Execute
fsutil.exe file setCaseSensitiveInfo C:\test\ enable
- Open C:\test in vscode
- Create hello.cpp and hello.h in C:\test
- Include hello.h in hello.cpp
- There will be a problem saying: cannot open source file "hello.h"
@bobbrow Running C/C++: Log Diagnostics
in this scenario gives:
-------- Diagnostics - 1/17/2024, 1:23:45 PM
Version: 1.18.5
Current Configuration:
{
"name": "Win32",
"includePath": [
"c:/test/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"intelliSenseMode": "windows-gcc-x64",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"mergeConfigurations": false,
"compilerPath": "D:\\Programs\\mingw64\\bin\\g++.exe",
"compilerPathIsExplicit": true,
"browse": {
"path": [],
"limitSymbolsToIncludedHeaders": true
}
}
cpptools version (native): 1.18.3.0
Translation Unit Mappings:
[ C:\test\hello.cpp ]:
C:\test\hello.cpp
C:\test\hello.h *
Translation Unit Configurations:
[ C:\test\hello.cpp ]:
Process ID: 34700
Memory Usage: 50 MB
Compiler Path: D:\Programs\mingw64\bin\g++.exe
Includes:
D:\Programs\mingw64\lib\gcc\x86_64-w64-mingw32\13.2.0\include\c++
D:\Programs\mingw64\lib\gcc\x86_64-w64-mingw32\13.2.0\include\c++\x86_64-w64-mingw32
D:\Programs\mingw64\lib\gcc\x86_64-w64-mingw32\13.2.0\include\c++\backward
D:\Programs\mingw64\lib\gcc\x86_64-w64-mingw32\13.2.0\include
D:\Programs\mingw64\lib\gcc\x86_64-w64-mingw32\13.2.0\include-fixed
D:\Programs\mingw64\x86_64-w64-mingw32\include
C:\test
Defines:
_DEBUG
UNICODE
_UNICODE
Standard Version: c++17
IntelliSense Mode: windows-gcc-x64
Other Flags:
--g++
--gnu_version=130200
Total Memory Usage: 50 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 2577
And if I running
fsutil.exe file setCaseSensitiveInfo C:\test\ disable
, the problem disappears.
from vscode-cpptools.
"C_Cpp.caseSensitiveFileSupport": "enabled"
.
It works.
But the error prompt is really confused. Will it be improved in future versions?
from vscode-cpptools.
Currently, the language server only sees this problem as a "file not found" issue. To fix this we'd have to scan your folders for the case sensitive flag. And if we do that, we might be able to automatically turn on the case sensitive file support. It's a good next step for the feature, but I don't have an ETA at this time as to when we will be able to work on it.
from vscode-cpptools.
Related Issues (20)
- Unable to include header folder (Ubuntu 21,04) HOT 1
- `ipch` IntelliSense cache taking up too much space. HOT 12
- Troubleshooting set history save on in GDB History Logging in Visual Studio Code
- the prelaunchtask c/c++: gcc build active file terminated with exit code -1 HOT 16
- C++ can't resolve configuration with compilerPath, even though its valid HOT 17
- Breakpoints are off when debugging through vscode, but work correctly when run through gdb correctly
- Feature Request: CPU Profiler Support HOT 4
- externalConsole on windows doesnt launch/work anymore on vscode 1.86 HOT 2
- Cannot return a ouput for go to definition when running as vscode command but can go to definition use UI HOT 6
- Error opening the file when click on error entry in problems pane HOT 6
- VS Code when debugging with gdb can't find source file. HOT 2
- IntelliSense not working via remote connection HOT 12
- Code folding in raw litrel HOT 1
- Fail in switching header/source when multiple files with same name are present HOT 2
- Decimal use produces unexpected errors: "identifier "_Decimal128" is undefined"; "extra text after expected end of number" HOT 1
- Sizeof struct incorrect for packed structs when preprocessor macro is used
- Workspace symbol search can randomly take longer if files are being tag parsed HOT 1
- Symbols loading from the target (via gdb/gdbserver) does not work HOT 1
- Incomplete presentation of warnings in editor when build tasks are set to use 'shared' panels, reveal policy 'silent'. HOT 1
- Rename symbol simply does a dumb string search and replace HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cpptools.