where are VS2017 system include files?

I am programming with Visual Studio 2017 Community and have come across a few <includes> that are not included. One was unistd.h. I found the file in my mingw64 folder, linked to it and error was resolved.

What I want to do is copy the file and put it with all of the visual studio system includes instead of linking to the mingw64 folder. I don't know what directory under visual studio to put it in.
Last edited on
Self-answered. Discussing with ppl on Microsoft Visual forum it was highly inadvisable to add .h to system directories.
closed account (E0p9LyTq)
Why do you want to add MinGW specific headers to MSVC++? They won't work as you expect them to work.
You are totally right; that's the revelation I had. So where do I get what I need? I need unistd.h which was specified in the source file of the project but wasn't included in project files by the vendor.
Last edited on
closed account (E0p9LyTq)
Poking around inside that header there are 4 more MinGW specific headers (io.h, process.h, getopt.h, sys/types.h) that get included with unistd.h.

Several of those headers add more MinGW specific headers into the mix.

If you really want to use MinGW headers just add the include directory into your project's C/C++ General section, Additional include Directories.
I need unistd.h which was specified in the source file of the project but wasn't included in project files by the vendor.

Sounds more like you need to be in an Linux/Unix environment not Windows.

unistd.h is a Linux/Unix system header file. Trying to compile a Linux program that requires this header is probably never going to work with Visual Studio's C++ compiler.

Last edited on
Topic archived. No new replies allowed.