Why does gnu_pds not work even though I have installed gcc

Viewed 675

I've recently installed gcc using Home-brew. Here are the details about my home-brew:

The command, 'which gcc' results to: /usr/bin/gcc

And the command 'brew info gcc' results to: Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔

When ever I type in #include <ext/pb_ds ... it shows me a whole bunch of files I've never downloaded before which means that GCC and all of the files are actually downloaded.enter image description here

As you can see above,it clearly shows me the files.

Here is what it looks like in my finder: enter image description here

However, I still recieve this error:

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>

I'm not so sure why it is giving me this error even though I clearly have all of the files working.

Someone told me that when I typed 'which gcc' it was meant to appear /usr/local/bin/g++-9 and not '/usr/bin/gcc.

Maybe this could be the reason why but im not too sure how to fix(change) that. Thank you.

P.S: im using visual studio code and a mac. And these were the following steps when I installed HomeBrew:

**1. export HOMEBREW_NO_ANALYTICS=1

  1. brew update

  2. brew upgrade

  3. brew info gcc

  4. brew install gcc

  5. brew cleanup**

0 Answers
Related