How to get rid of visual studio cross platform header E0020 errors?


I’m trying to remote debug my c++ code on wsl ,

I code in visual studio 2022 on the same computer, (on windows of course),

although I successfully compiled my c++ code ,

but annoying errors keeps coming out .

enter image description here

enter image description here

it reminds me that __attr_dealloc_free from stdio.h is unrecongnizable .

I tried including all kinds of directories ,but still failed to get rid of this error.

It seems odd to me ,that I can browse into the cdefs.h , and read the definition of __attr_dealloc_free ,but visual studio still reminds me this macro is unrecongnizable .


There’s just “Configuration Properties–>General->Remote Copy Include Directories” and “Configuration Properties–>c/c++–>Intellisense”,

enter image description here

Leave a Reply

Your email address will not be published. Required fields are marked *