'remove the link between clang++ and g++ on macos mojave

So I recently switched to mac and wanted to make a game with SDL2 and C++ and when I compiled some basic code to make a blank window with g++ it gave me an error with clang, I found out that clang links to GCC and g++, is there a way to remove this link so I can compile with g++? I installed it with Homebrew.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source