easy-cpp-projects icon indicating copy to clipboard operation
easy-cpp-projects copied to clipboard

[Question] Unable to fix include path errors

Open JakeHadley opened this issue 6 years ago • 1 comments

I'm having an issue having intellisense find header files in the same folder as the source code.

My project is setup like this:

projectDir
---.vscode
---subDir
------src
---------main.cpp
---------header.h

I know it works because it compiles, but it's a problem with intellisense not picking it up. I have a c_cpp_properties.json file:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",            
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++14",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

What am I missing?

JakeHadley avatar Jun 14 '19 15:06 JakeHadley

I just tried a setup like yours with a source and header files inside a subdirectory and the intellisense seems to work just fine with a newly generated project. I tried this without a c_cpp_properties.json file on Linux.

Easy C++ Projects does not provide c_cpp_properties.json, so this may be a problem with the C/C++ extension itself.

image

acharluk avatar Jun 26 '19 15:06 acharluk