I am using Visual Studio 2017. I just updated it and started to get this error on every project I have:
C++ cannot open source file "sys/types.h"
C++ cannot open source file "sys/stat.h"
Didn't find any similar questions so sorry if duplicated. The error is for this 2 lines in file wchar.h and the error code is E1969 for both errors, tried repairing but didn't work, any help would be appreciated!
#include <sys/stat.h>
#include <sys/types.h>
I was getting this error when I opened a project made by someone else in an older version of Visual Studio. Here is how I solved it:
Go to Project > [Project name] Properties...
Click VC++ Directories
Select Include Directories then Click the drop-down arrow to the right and select Edit...
Click New Line icon (looks like new folder icon)
Click the ... to browse for a directory
Navigate to C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt (Note that you don't drill down into the sys folder)
Click Select Folder > Ok > Ok
Once I did that the error was gone along with related errors in the code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With