0

I have a Linux-specific source file that includes a few Linux-specific headers, such as dirent.h. I added this source file to my cross-platform (Linux) project in VS2017, but IntelliSense is throwing flags at me that it cannot find these headers.

Is there a specific directory I should be adding to my include list to find them?

If not, how do I handle platform specific headers in a cross-platform project?

Edit for clarification: I'm specifically trying to assume that it is a Linux header, but I am editing on a Windows machine using the cross-platform VS feature.

SeaNick
  • 501
  • 1
  • 4
  • 14
  • Possible duplicate of [How to have different Headers in different platforms?](https://stackoverflow.com/q/20978363/608639) and [How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor?](https://stackoverflow.com/q/5919996/608639) – jww Feb 16 '18 at 22:33
  • I believe those questions are for writing generically platform-independent code, which I'm not doing here. I'm specifically trying to assume that it is a Linux header, but I am editing on a Windows machine using the cross-platform VS feature. – SeaNick Feb 19 '18 at 17:16

1 Answers1

0

I found the answer in the MS blogs. The short answer is that the includes are never present, and need to be copied over from the Linux machine into a local folder to add.

https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/#includes

SeaNick
  • 501
  • 1
  • 4
  • 14