I have an embedded project in VisualStudio code which works perfectly fine for the most part. My problem is that somehow _WIN32 is always defined, which leads to wrong includes in some header files.
I guess the problem is an Intellisense issue because the project compiles without any errors (I use the IAR compiler). It's just the error squiggles from Intellisense which display the error. (For example in one header file it trys to open <windows.h> because of the _WIN32 define, which obviously will fail in an embedded project with an embedded compiler, so Intellisense reports that it can't open the header file)
Now, what i tried so far:
- Changing the Intellisense mode but even if I switch it to gcc or clang for ARM, _WIN32 stays defined
- Trying to remove the _WIN32 define from code, but it seems that VSCode defines it internally (if that makes any sense ?). I looked at this thread where they try to answer the question where _WIN32 is defined. But that didn't help me either.
Does anyone have an idea why _WIN32 is defined or where it is defined ? How can i tell VisualStudio code / Intellisense to not define _WIN32 ?
Thanks in advance.