VS Code include error for custom message headers, but builds fine
Hello,
I tried a lot but cannot get rid of the include errors of my custom messages in vs code. Everything builds fine, but vs code does not seem to find the generated headers. I edited the "includePath" in c_cpp_properties.json to point to the location of non default headers and it worked for everything but not my custom messages.
Here is a screenshot to show it. https://imgur.com/corGr4R
My c_cpp_properties.json looks like this:
{
"configurations": [
{
"name": "ROS",
"browse": {
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"/opt/ros/noetic/include",
"/usr/include/**",
"${workspaceFolder}/devel/include",
"${workspaceFolder}/**",
"/usr/local/include/opencv4", // OpenCV installed from source
"/home/julian/freenect2/include/**", // Freenect2
"/home/julian/installers/FRI-Client-SDK_Cpp" // SDK for FRI from KUKA
],
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/g++",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}
I would appreciate any help that might solve this issue.
Thanks
instead of this
may be you can try to put whole path of package? something like
or
for me the last one is working.
Thanks for the answer. I tried both but they don't work for me either. I tried to reinstall the C/C++ Extension but it also did not work. Weird thing is that I have the same problem on both of my pcs.
One more thing came in my mind that,
${workspaceFolder}
might not be pointing to the ros workspace (I am not sure how your vscode workspace has been set-up) . can you try to put direct path to devel folder of your ros workspace?Thanks, I tried it but it did not work for me either. I Also tried to reinstall vscode from apt or software center and deleted all config files before, but also no luck.
Oh. No idea thn. sorry :(