简体   繁体   English

Visual Studio 2017跨平台中特定于Linux的标头

[英]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 . 我有一个特定于Linux的源文件,其中包含一些特定于Linux的头文件,例如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. 我将此源文件添加到了VS2017中的跨平台(Linux)项目中,但是IntelliSense向我抛出了无法找到这些标头的标志。

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. 编辑以澄清问题:我专门尝试假定它是Linux标头,但是我正在使用跨平台VS功能在Windows计算机上进行编辑。

I found the answer in the MS blogs. 我在MS博客中找到了答案。 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. 简短的答案是,包含文件永远不会出现,需要从Linux计算机复制到本地文件夹中进行添加。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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