Visual Studio代码重点介绍了我所有的过剩功能定义,但完美编译。 我怎样才能摆脱红色下划线的,而不使语法高亮?
包括main.h
:
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/glut.h>
#include <math.h>
#include <string>
我说我能想到的在include路径和浏览路径段的所有路径c_cpp_properties.json
文件。
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/include/GL",
"/usr/local/include",
"${workspaceRoot}",
"/usr/include/x86_64-linux-gnu/c++/5",
"/usr/include/c++/5",
"/usr/lib/x86_64-linux-gnu"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/include/GL",
"/usr/local/include",
"${workspaceRoot}",
"/usr/include/x86_64-linux-gnu/c++/5",
"/usr/include/c++/5",
"/usr/lib/x86_64-linux-gnu"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
我使用Visual Studio代码1.18在Ubuntu 16.04和我的生成命令是:
g++ -g main.cpp -L/usr/lib/x86_64-linux-gnu -lGL -lglut -lGLEW -lGLU
有任何想法吗?