Thank you for this suggestion, @McMartin, I should no doubt keep away from the linker flags in that case.
Unfortunately, I’m still hitting a dead-end at every turn on getting the library to link.
I moved the path of the library on disk to one without a space in the path name, so I could eliminate that issue from the troubleshooting. Then I tried the new path name in the “Extra library search paths” and “External libraries to link” fields (one at a time), and Xcode still throws a ld: library not found
error.
So then I cleared those fields in Projucer, and tried adding the library from within the Xcode project settings (following this example). Under “Build Phases”, I added a “Link Binary With Libraries” phase to the “Shared Code” section.
I then get these errors:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:
can't locate file for: -lcryptopp
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file:
-lcryptopp is not an object file (not allowed in a library)
So then I figure I made a mistake in compiling the library (I had just run the default make
script from the library), because Xcode apparently doesn’t like the looks of it. I checked the cryptopp Install.txt file, and rebuilt the library using this option (since LLVM is Xcode’s compiler, I thought it might make it happier):
LLVM's libc++ is also supported, so you can:
export CXXFLAGS="-std=c++11 -stdlib=libc++"
make
Unfortunately, even after rebuilding the library, I’m still getting the same -lcryptopp is not an object file
error when I try to compile the Xcode project.
???