C++ Visual Studio代码Intellisense在MacOS下找不到标头
我最近切换到MaOS,并希望使用VisualStudio代码来为C++项目使用ARMADILO库。该库安装在/usr/local/include下C++ Visual Studio代码Intellisense在MacOS下找不到标头,c++,visual-studio-code,C++,Visual Studio Code,我最近切换到MaOS,并希望使用VisualStudio代码来为C++项目使用ARMADILO库。该库安装在/usr/local/include下 (base) x@x-MacBook-Pro include % ls -l /usr/local/include total 72 -rw-r--r-- 1 root wheel 30382 Jun 16 2016 armadillo drwxr-xr-x 596 root wheel 19072 Apr 21 10:35 arm
(base) x@x-MacBook-Pro include % ls -l /usr/local/include
total 72
-rw-r--r-- 1 root wheel 30382 Jun 16 2016 armadillo
drwxr-xr-x 596 root wheel 19072 Apr 21 10:35 armadillo_bits
drwxr-xr-x 9 root wheel 288 Jan 14 13:47 fuse
-rw-r--r-- 1 root wheel 246 Jan 2 03:54 fuse.h
CMake还可以在那里找到库,并毫无问题地编译作品。
但是,在VSCode中,IntelliSense始终显示包含错误,建议将“/usr/local/include”添加到IncludePath。然而,这样做不会改变任何事情,我仍然会看到错误。我的c_cpp_properties.json如下所示
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${default}",
"/usr/local/include/**"
],
"defines": [],
"macFrameworkPath": [],
"compilerPath": "/usr/bin/clang++",
"intelliSenseMode": "${default}",
"cppStandard": "c++17",
"cStandard": "c17",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}
我是否包括两个星号也没有区别
我使用的是安装在MacOs 11.3.0下的自制软件中的Visual Studio代码1.56.0。C/C++扩展的版本是1.3.1。添加include路径后,是否尝试重新编译和链接代码?我停止使用VSCODEL作为C++,因为缺少反馈给用户这样的问题。不幸的是,你在mac电脑上。如果你使用的是windows,我会立即建议你使用Visual Studio。是的,即使在运行CMake并再次编译之后,它仍然不会改变任何东西。