Visual Studio ROS 的代码 IncludePath 问题 headers
Visual Studio Code IncludePath Issue with ROS headers
我在 ROS2 tutorial 中 #include "rclcpp/rclcpp.hpp"
的语句下出现了波浪线 我正在经历 c_cpp_properties.json
中更新 IncludePath 并没有解决问题。
这是我的 c_cpp_properties 文件的样子:
{
"configurations": [
{
"browse": {
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"/opt/ros/foxy/include/**",
"/home/thomas/ws_ros2/src/cpp_pubsub/include/**",
"/usr/include/**"
],
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++14",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
ROS 扩展识别出我正在使用 ROS 包,所以我的 settings.json
看起来像这样:
{
"python.autoComplete.extraPaths": [
"/home/thomas/ws_ros2/install/warehouse_ros_mongo/lib/python3.8/site-packages",
"/home/thomas/ws_ros2/install/moveit_msgs/lib/python3.8/site-packages",
"/opt/ros/foxy/lib/python3.8/site-packages"
],
"C_Cpp.errorSquiggles": "Enabled"
}
但无论我做什么,我似乎都无法摆脱这些波浪线。
从 c_cpp_properties.json
中删除 configurationProvider 成功了,intellisense 现在可以正常工作了。
我在 ROS2 tutorial 中 #include "rclcpp/rclcpp.hpp"
的语句下出现了波浪线 我正在经历 c_cpp_properties.json
中更新 IncludePath 并没有解决问题。
这是我的 c_cpp_properties 文件的样子:
{
"configurations": [
{
"browse": {
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"/opt/ros/foxy/include/**",
"/home/thomas/ws_ros2/src/cpp_pubsub/include/**",
"/usr/include/**"
],
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++14",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
ROS 扩展识别出我正在使用 ROS 包,所以我的 settings.json
看起来像这样:
{
"python.autoComplete.extraPaths": [
"/home/thomas/ws_ros2/install/warehouse_ros_mongo/lib/python3.8/site-packages",
"/home/thomas/ws_ros2/install/moveit_msgs/lib/python3.8/site-packages",
"/opt/ros/foxy/lib/python3.8/site-packages"
],
"C_Cpp.errorSquiggles": "Enabled"
}
但无论我做什么,我似乎都无法摆脱这些波浪线。
从 c_cpp_properties.json
中删除 configurationProvider 成功了,intellisense 现在可以正常工作了。