Crypto++ is a popular C++ library for cryptography. Instruction in this article can be used to install Cryptopp for all operating systems similar to Kali Linux. Check out this article if you want to use it with Xcode in macOS.
Step 1: Download Crypto++ using this link
Step 2: Extract Crypto++ and switch to that directory from the terminal or shell.
Step 3: $ make
Step 4: $ make test
Step 5: $ sudo make install
Step 6: Compile your program using
g++ -I/usr/local/include -L/usr/local/lib yourCode.cpp -lcryptopp