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

[bug] Intellisense/Autocompletion [C++] is not working! #336

Closed
milan-r-shah opened this issue Nov 6, 2020 · 3 comments
Closed

[bug] Intellisense/Autocompletion [C++] is not working! #336

milan-r-shah opened this issue Nov 6, 2020 · 3 comments
Assignees
Labels
bug Something isn't working Linux ROS1

Comments

@milan-r-shah
Copy link

general information
OS version: Ubuntu 18.04 LTS
Version of the plugin: v0.6.4

what is the bug
Intellisense/Autocompletion is not working!

I have already tried configuring my c_cpp_properties.json through this extension by running ROS: Update C++ properties command. But still, IntelliSense is not working. Here is my c_cpp_properties.json file:

{
    "configurations": [
        {
            "browse": {
                "databaseFilename": "",
                "limitSymbolsToIncludedHeaders": true
            },
            "includePath": [
                "/opt/ros/melodic/include/**",
                "/home/milan/catkin_ws/src/my_ros_package/include/**",
                "/usr/include/**"
            ],
            "name": "ROS",
            "intelliSenseMode": "gcc-x64",
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "gnu11",
            "cppStandard": "gnu++14"
        }
    ],
    "version": 4
}

expected behavior
Autocompletion should work!

additional context
In the extension setting:
Ros:Distro
ROS installation distro to be sourced.,
I tried putting:

  • Melodic
    but it shows: Could not source the setup file for ROS distro "Melodic".

  • /opt/ros/melodic/setup.bash
    but it shows: Could not source the setup file for ROS distro "/opt/ros/melodic/setup.bash".

  • even my local setup.bash i.e. ~/catkin_ws/devel/setup.bash
    but it shows: Could not source the setup file for ROS distro "~/catkin_ws/devel/setup.bash".

@milan-r-shah milan-r-shah added the bug Something isn't working label Nov 6, 2020
@ooeygui ooeygui self-assigned this Dec 3, 2020
@ooeygui ooeygui added Linux ROS1 help wanted Extra attention is needed labels Dec 3, 2020
@LucasWaelti
Copy link

Try to change from "cppStandard": "gnu++14" to "cppStandard": "c++14". ROS is using the c++14 standard, so specifying gnu++14 seems to break things. This was deduced from this question.

@ooeygui
Copy link
Member

ooeygui commented Dec 8, 2020

@LucasWaelti Thanks for the investigation!

@tranvnhan
Copy link

Try to change from "cppStandard": "gnu++14" to "cppStandard": "c++14". ROS is using the c++14 standard, so specifying gnu++14 seems to break things. This was deduced from this question.

It works for me. Thanks.

@ooeygui ooeygui removed the help wanted Extra attention is needed label Aug 25, 2021
@ooeygui ooeygui closed this as completed Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux ROS1
Projects
None yet
Development

No branches or pull requests

4 participants