How do I install g++ on MacOS X?

前端 未结 5 1235
臣服心动
臣服心动 2020-12-09 16:15

I want to compile C++ code on MacOS X, using the g++ compiler. How do I install it?

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 16:27

    xcode is now available for free from the app store. Just "buy it" (for free) and it will download. To get the command line tools go into preferences/downloads and "install command line compiler tools".

    Instead of gcc you are using clang, but it works the same.

提交回复
热议问题