C/C++ extension for Visual Studio Code, gcc, Mac: “variable uint32_t is not a type name”

后端 未结 2 2114
遇见更好的自我
遇见更好的自我 2021-01-06 22:42

I\'ve begun using VSC for my embedded C projects with gcc for ARM on a Mac. Having set up include paths in c_cpp_properties.json, most of my #includes

2条回答
  •  爱一瞬间的悲伤
    2021-01-06 22:59

    After trying all of the proposed solutions to no effect, I consider the uint32_t issue to be a bug.

    To solve the annoying warnings in VSCode, just add the following line after your #include section:

    typedef __uint32_t uint32_t;
    

    By doing this once in a single file, it fixes my VSCode warnings and still compiles.

提交回复
热议问题