---
# System prepended metadata

title: 編譯環境
tags: [C++]

---

---
tags: C++
disqus: HackMD
---

編譯環境
===

Macbook Pro M1
OS：Mac OS
CPU：ARM64

```shell=
brew install gcc
brew install pkg-config
brew install opencv
```

```shell=
ln -s /opt/homebrew/Cellar/opencv/4.5.1_3/include/opencv4/opencv2 /usr/local/include/opencv2
```

```cpp=
g++ main.cpp -o main.out -std=c++11 `pkg-config --cflags --libs opencv4`
```