简体   繁体   中英

Linux-Specific Headers in Visual Studio 2017 Cross-Platform

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM