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

header file not found #10935

Closed
7osssam opened this issue May 10, 2023 · 2 comments
Closed

header file not found #10935

7osssam opened this issue May 10, 2023 · 2 comments
Assignees
Labels
Language Service more info needed The issue report is not actionable in its current state

Comments

@7osssam
Copy link

7osssam commented May 10, 2023

Environment

  • OS and Version: Windows 11
  • VS Code Version: Version: v1.78.1
  • C/C++ Extension Version: v1.15.4

Bug Summary and Steps to Reproduce

Bug Summary:
image
i'm getting this error that i believe it's caused by intellisense, when I hover and/or click io.h i can access the file and i can actually build the c file and get a hex file using AVR Helper extension with no problem…
I tried the solution on these issues but nothing seems to solve it

here is my c_cpp_properties.json file

{
    "configurations": [
        {
            "name": "AVR",
            "includePath": [
                "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\avr\\**",
                "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\**",
                // "D:/XDUMP/Toolchain/AVR/avr8-gnu-toolchain-win32_x86_64/avr/include/avr/**",
                // "D:/XDUMP/Toolchain/AVR/avr8-gnu-toolchain-win32_x86_64/avr/include/**",
                "${workspaceFolder}/**"
            ],
            "intelliSenseMode": "gcc-x64",
            //"intelliSenseMode": "${default}",
            "compilerPath": "D:/XDUMP/Toolchain/AVR/avr8-gnu-toolchain-win32_x86_64/bin/avr-gcc.exe",
            "cStandard": "c99",
            "cppStandard": "${default}",
            "compilerArgs": [
                "-g",
                "-Os",
                "-Wall",
                "-Wextra",
                "-fpermissive",
                "-fno-exceptions",
                "-fno-threadsafe-statics",
                "-pipe",
                "-mmcu=atmega32a",
                "-DF_CPU=16000000UL"
            ],
            "defines": [
                "__ATmega32A__",
                "__AVR_ATmega32A__"
            ],
            "browse": {
                "limitSymbolsToIncludedHeaders": false,
                "path": [
                    "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\avr\\**",
                    "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\**",
                    "${workspaceFolder}/**"
                ]
            }
        }
    ],
    "version": 4
}

Configuration and Logs

-------- Diagnostics - 5/10/2023, 9:54:32 PM
Version: 1.15.4
Current Configuration:
{
    "name": "AVR",
    "includePath": [
        "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\avr\\**",
        "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\**",
        "d:\\XDUMP\\Embedded/**"
    ],
    "intelliSenseMode": "gcc-x64",
    "compilerPath": "D:/XDUMP/Toolchain/AVR/avr8-gnu-toolchain-win32_x86_64/bin/avr-gcc.exe",
    "cStandard": "c99",
    "compilerArgs": [
        "-g",
        "-Os",
        "-Wall",
        "-Wextra",
        "-fpermissive",
        "-fno-exceptions",
        "-fno-threadsafe-statics",
        "-pipe",
        "-mmcu=atmega32a",
        "-DF_CPU=16000000UL"
    ],
    "defines": [
        "__ATmega32A__",
        "__AVR_ATmega32A__"
    ],
    "browse": {
        "limitSymbolsToIncludedHeaders": true,
        "path": [
            "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\avr\\**",
            "D:\\XDUMP\\Toolchain\\AVR\\avr8-gnu-toolchain-win32_x86_64\\avr\\include\\**",
            "${workspaceFolder}/**"
        ]
    },
    "compilerPathIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "intelliSenseModeIsExplicit": true,
    "compilerPathInCppPropertiesJson": "D:/XDUMP/Toolchain/AVR/avr8-gnu-toolchain-win32_x86_64/bin/avr-gcc.exe",
    "mergeConfigurations": false,
    "configurationProvider": "AVR"
}
Translation Unit Mappings:
[ D:\XDUMP\Embedded\AVR _project\AVRtest.c ]:
    D:\XDUMP\Embedded\AVR _project\AVRtest.c
Translation Unit Configurations:
[ D:\XDUMP\Embedded\AVR _project\AVRtest.c ]:
    Process ID: 19988
    Memory Usage: 53 MB
    Compiler Path: D:\XDUMP\Toolchain\AVR\avr8-gnu-toolchain-win32_x86_64\bin\avr-gcc.exe
    Includes:
        D:\XDUMP\Toolchain\AVR\avr8-gnu-toolchain-win32_x86_64\lib\gcc\avr\7.3.0\include
        D:\XDUMP\Toolchain\AVR\avr8-gnu-toolchain-win32_x86_64\lib\gcc\avr\7.3.0\include-fixed
        D:\XDUMP\Toolchain\AVR\avr8-gnu-toolchain-win32_x86_64\avr\include
    Defines:
        __ATmega32A__
        __AVR_ATmega32A__
        F_CPU=16000000UL
    Standard Version: c99
    IntelliSense Mode: windows-gcc-x64
    Other Flags:
        --gcc
        --gnu_version=70300
Total Memory Usage: 53 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 631
@Colengms Colengms self-assigned this May 11, 2023
@Colengms
Copy link
Contributor

Hi @7osssam . I installed avr8-gnu-toolchain-win32_x86_64 and tried to replicate your scenario, but was unable to reproduce the error. It was able to find io.h and did not get a squiggle.

In your log output, I see that io.h was also open at the time, and the C/C++ extension was aware that it was included by test.c (as it was processed as part of the same file translation-unit). Is it possible you have another extension installed that is also providing squiggles for C source files, which might be the source of that squiggle?

Could you provide some additional information, such as the list of extensions you have installed, and the output of the problems pane (and maybe a image snip of the hover contents in which the error is displayed?) (I don't believe the C/C++ extension would display red text to the right of the include statement with "arv/io.h not found", so I assume that is either something you added to highlight the issue, or perhaps was provided by another extension).

It might also be helpful if you could provide a self-contained example that we might use to reproduce the problem, perhaps in the form of a zip file or a githug repo.

@Colengms Colengms added Language Service more info needed The issue report is not actionable in its current state labels May 11, 2023
@7osssam
Copy link
Author

7osssam commented May 11, 2023

Hello @Colengms,

Thank you for your prompt response. I followed your suggestion and began disabling some of the C/C++ related extensions. I discovered that the issue was actually caused by a different extension, namely vscode-clang, as you suggested. I apologize for any inconvenience or wasted time that may have resulted from my previous issue.

Once again, thank you for your assistance. Have a good day.

@7osssam 7osssam closed this as completed May 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Language Service more info needed The issue report is not actionable in its current state
Projects
None yet
Development

No branches or pull requests

2 participants