为什么即使我安装了gcc,gnu_pds也不起作用

时间:2020-08-11 04:48:57

标签: c++ gcc data-structures visual-studio-code compiler-errors

我最近使用Home-brew安装了gcc。以下是有关我的自酿啤酒的详细信息:

命令“哪个gcc” 结果为:/ usr / bin / gcc

命令'brew info gcc'结果为:必需:gmp✔,isl✔,libmpc✔,mpfr✔

每当我输入#include enter image description here < / p>

如您在上面看到的,它清楚地向我显示了文件。

这是我的取景器中的样子: enter image description here

但是,我仍然收到此错误:

g++ -std=c++11 testprogram1.cpp -o testprogram1
testprogram1.cpp:2:9: fatal error: 'ext/pb_ds/assoc_container.hpp' file not found
#include<ext/pb_ds/assoc_container.hpp>

即使我显然所有文件都在工作,我不确定为什么会出现此错误。

有人告诉我,当我键入'哪个gcc'时,它应该显示为 / usr / local / bin / g ++-9 ,而不是'/ usr / bin / gcc

也许这可能是为什么但我不太确定如何解决(更改)的原因。谢谢。

P.S:即时通讯使用Visual Studio代码和Mac。这些是我安装HomeBrew时的以下步骤:

** 1。导出HOMEBREW_NO_ANALYTICS = 1

  1. 啤酒更新

  2. 酿造升级

  3. 啤酒信息gcc

  4. 酿造gcc

  5. 啤酒清洁**

0 个答案:

没有答案