Giter Club home page Giter Club logo

Comments (6)

bobbrow avatar bobbrow commented on May 28, 2024 1

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.

browntarik avatar browntarik commented on May 28, 2024

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:
# include

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.

bobbrow avatar bobbrow commented on May 28, 2024

@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.

Zewbiee avatar Zewbiee commented on May 28, 2024

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:

  1. Create an empty folder C:\test
  2. Execute
fsutil.exe file setCaseSensitiveInfo C:\test\ enable
  1. Open C:\test in vscode
  2. Create hello.cpp and hello.h in C:\test
  3. Include hello.h in hello.cpp
  4. 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.

Zewbiee avatar Zewbiee commented on May 28, 2024

"C_Cpp.caseSensitiveFileSupport": "enabled".

It works.

But the error prompt is really confused. Will it be improved in future versions?

from vscode-cpptools.

bobbrow avatar bobbrow commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.