when I try to compile and run (using Xcode) it raises 38 linking errors...
You need to add the Crypto++ headers and library to your Xcode project. The images below were taken from the Crypto++ wiki, and presumes Crypto++ is installed in /usr/local/cryptopp
.
Add the headers here:
Add the library here:
If you are cross-compiling for iOS (its Mach-O too), the Crypto++ wiki has a couple of pages on the subject:
If you want a pre-built Crypto++ for iOS with ARMv7, ARMv7s, ARM64 and i386 (simulator), see this Github account.
Before you make the library yourself, you should open the makefile (GNUmakefile
), and uncomment CXXFLAGS = -fPIC
.
Also, because of #include <chrono>
, you might need to add CXXFLAGS += -stdc++11
. I'm not sure because I don't recall trying to mic C++ 03 and C++ 11.
Crypto++ 5.6.2 and earlier also required -DCRYPTOPP_DISABLE_ASM
on Intel platforms because of Clang's integrated assembler and Apple's downlevel linker.
Crypto++ 5.6.3 and above managed to work around most of the issues. Problems that could not be worked around effectively had -DCRYPTOPP_DISABLE_ASM
applied to the offending translation unit rather than the entire library.