Bing found these results
Bokep
- Viewed 5k times7answered May 9, 2021 at 10:33
I found out it was IntelliSense causing the error through the C/C++ Extension.
I also found an option of adding compiler arguments to IntelliSense, which is exactly what I was looking for.
Either through the UI:
Press F1 -> > C/C++: Edit Configurations (UI) -> Scroll down to Defines
Or via the JSON :
c_cpp_properties.json configurations has a field defines which holds any compiler arguments.
Content Under CC-BY-SA license c_cpp_properties.json reference - Visual Studio Code
Explore further
How can I define macros for the C++ intellisense engine?
VSCode: Set C/C++ preprocessor macro for static analysis
Configure C/C++ IntelliSense - Visual Studio Code
C/C++ extension FAQ - Visual Studio Code
Intellisense Can't Find Preprocessor Definition from "defines
- People also ask
Add custom preprocessor definitions? · Issue #304 · …
/D (Preprocessor Definitions) | Microsoft Learn
IntelliSense (the project indexer) | The xPack Build Framework
Predefined macros | Microsoft Learn
highlight the code, based on preprocessor definitions #510 - GitHub
VS Code C++ Extension January Update: Create Definitions and ...
HLSL Tools - Visual Studio Marketplace
Defining preprocessor options using Visual Studio Code
Make vscode assume preprocessor definitions to be set? : …
How to add preprocessor macros in VS code with NCS.
how to add preprocessor definition · Issue #66512 · …
Where can I see the preprocessor definitions in SES using nRF …
Where to specify preprocessor directives in visual studio?
windows - VS Code not defining _WIN32 - Stack Overflow