kuniga.me > Docs > C++ External Libraries Cheatsheet
git clone https://github.com/facebook/folly.git
On MacOS it uses homebrew, no need to use sudo
(as the README suggests):
cd folly
./build/fbcode_builder/getdeps.py install-system-deps --recursive
Create a directory inside your home, folly/
. Run:
python3 ./build/fbcode_builder/getdeps.py --allow-system-packages build --install-dir /home/me/folly/
On MacOS, add to .bash_profile
:
export CPLUS_INCLUDE_PATH=/home/me/folly/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=/home/me/folly/lib:$LIBRARY_PATH
During compilation:
g++ -std=c++17 main.cpp -lfolly