Fixing Incomplete Type Error on struct addrinfo on VSCode
C/C++
Hello macOS user again!
incomplete class type "struct addrinfo" is not allowed
I encountered this really annoying issue when I was writing a tiny socket program in C on VSCode. And the solution was mentioned on C/C++ VSCode extension issues on GitHub.
You can try either this:
"defines": [
"_POSIX_C_SOURCE=200112L"
],
, or this.
Thanks for reading ✌️