where are VS2017 system include files?

Apr 22, 2018 at 3:48pm
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 Apr 22, 2018 at 3:50pm
Apr 22, 2018 at 5:54pm
Self-answered. Discussing with ppl on Microsoft Visual forum it was highly inadvisable to add .h to system directories.
Apr 22, 2018 at 7:16pm
closed account (E0p9LyTq)
Why do you want to add MinGW specific headers to MSVC++? They won't work as you expect them to work.
Apr 24, 2018 at 5:21pm
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 Apr 24, 2018 at 5:42pm
Apr 24, 2018 at 8:56pm
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.
Apr 26, 2018 at 8:56pm
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 Apr 26, 2018 at 8:57pm
Topic archived. No new replies allowed.