16
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macにgcc5.3をインストール

Posted at

競技プログラミング等でよく使われている #include <bits/stdc++.h>を使ってみようとしたが、mac標準のllvmでは使えない。
以下のエラーが出る。

fatal error: 'bits/stdc++.h' file not found
#include <bits/stdc++.h>
         ^
1 error generated.

そこで、gcc5.3をインストールする。
homebrewからインストールし、シンボリックリンクを貼ればいい。

brew tap homebrew/versions
brew install gcc5
ln -s /usr/local/bin/gcc-5 /usr/local/bin/gcc
ln -s /usr/local/bin/g++-5 /usr/local/bin/g++
16
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?