LoginSignup
8
1

More than 3 years have passed since last update.

AtCoder Library インストールの覚え書き (MacOS, VSCode)

Posted at
  • macOS Catarina で zsh を利用している環境を前提とします。
  • ここでは任意のインストール先を /***/ と表現します。

AtCoder Library のダウンロード

GitHub から Clone する

% cd /***/
% git clone https://github.com/atcoder/ac-library.git

C++ のインクルードパスを設定

.zshrc に以下の一行を追加

export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/***/ac-library"

以上!

VSCode C/C++ extention の
c_cpp_properties.json への追加も必要かな?とおもっていましたが、
CPLUS_INCLUDE_PATH に通しておけば intelliSense も問題なく効くようです。
ただし設定後に VSCode を再起動しておく必要があります。

あとはソースコード上で以下のように読み込めばすぐに使用できました。

#include <atcoder/all>
using namespace atcoder;
8
1
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
8
1