[Solved] 'cryptopp/aes.h' file not found; Expected namespace name
If you are facing errors like "'cryptopp/aes.h' file not found" or getting "Expected namespace name" error for "using namespace CryptoPP;" or similar compilation errors, refer to the following settings:
- Add "/usr/local/include" in Header search paths
- Add "/usr/local/lib" in Library search paths
- Add -lcryptopp as a Linker flag
Refer to this article for more information: https://com.puter.tips/2021/02/how-to-use-cryptopp-in-xcode.html
These C++ build errors mean the compiler cannot find the Crypto++ headers or library, so the CryptoPP namespace looks undefined. The include and library search paths are not set.
Adding /usr/local/include to the header search paths and the matching library path to the linker settings points the build at Crypto++ and clears both errors at once.
Comments
Post a Comment