Linux C ++开发Intellisense不对,如何修复? [英] Linux C++ Development Intellisense is not right, how to fix?

查看:76
本文介绍了Linux C ++开发Intellisense不对,如何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现VS 2017支持C ++ Linux开发,我想我会试一试。  到目前为止,对于一些简单的东西,似乎没关系。  然而,我立即看到Intellisense的问题抱怨某些功能没有定义,并且
它无法打开各种包含文件,即使这些是相当标准的。  所以我的代码充斥着红色的方格线,告诉我到处都有错误,但这是无稽之谈,因为它编译得很好并且运行。

I just found that VS 2017 supports C++ Linux development and I'd thought I'd give it a go.  So far for some simple stuff, seems okay.  However, right away I see issues with Intellisense complaining that some functions are not defined and it can't open various include files even though these are fairly standard.  So my code is littered about with the red squiqgly lines telling me that there are errors everywhere but it is nonsense because it compiles fine and runs.

这是一个示例代码,它将给出两个包含文件unistd.h和dirent.h的问题,说它无法加载文件,并且函数chdir()是一个标准的C / C ++函数,它表示标识符未定义。

Here is an example code that will give problem with the two include files, unistd.h and dirent.h, saying that it can't load the files, and with function chdir(), a standard C/C++ function, it says identifier undefined.

#include <cstdio>
#include <iostream>
#include <string.h>
#include <unistd.h>
#include <dirent.h>

int main(int argc, char *argv[])
{
	std::string sdir ;
	
	sdir = "/var/www/virtual/";
	chdir(sdir.c_str());
    
	/* DO STUFF */
	
    return 0;
}

如何解决这个问题,以便IDE更聪明地了解这些事情?

How to fix this so that the IDE is smarter about these things?




推荐答案

嗨Jose,

谢谢在MSDN论坛上发帖。

Thank you for posting in MSDN forum.

我根据您的描述和您提供的代码示例进行了测试,并成功复制了此问题,请参阅:

I did a test according to your description and the code samples you offered, and reproduced this issue successfully, see:

在这种情况下,我会帮您提交反馈意见并将此报告给Visual Studio产品团队:

In this situation, I help you submit a feedback and report this to Visual Studio product team:

https://developercommunity.visualstudio.com/content/problem/23906/linux-c-development-intellisense-is-not-right.html

微软工程师会认真评估他们,请耐心等待,直到这个问题得到解决。

Microsoft engineer will evaluate them seriously, please wait patiently till this issue fixed.

感谢您的理解。

Best R egards, 

Best Regards, 


这篇关于Linux C ++开发Intellisense不对,如何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆