vscode写win代码很多变量定义、宏未识别

vscode写win代码很多变量定义、宏未识别

源代码如下,能够编译并成功运行

img

以下是我的vscode定义

c_cpp_properties.json

img

launch.json

img

task.json

img

settings.json

img

c_cpp_properties.json的includepath中添加gcc的include路径。
源代码中添加windows.h

include 文件没处理好吧。

什么系统

1进入到c_cpp_properties.json文件
2在里面的“includepath”这一项后面加上你源码中的头文件路径,例如:/home/..../include/**
3回到工作空间下,重新进行编译catkin_make也可以指定该功能包进行编译。