On Tuesday, October 25, 2016 at 2:12:24 PM UTC-4, [email protected] wrote: > > I am having an issue when trying to use the Crypto++ Library on an iOS > device... Below are the errors I am getting: > > Undefined symbols for architecture arm64: > "typeinfo for unsigned char", referenced from: > bool CryptoPP::NameValuePairs::GetValue<unsigned char>(char const*, > unsigned char&) const in libA.a(basecode.o) > "std::__1::basic_string<char, std::__1::char_traits<char>, > std::__1::allocator<char> >::assign(char const*, unsigned long)", > referenced from: > CryptoPP::BERDecodeTextString(CryptoPP::BufferedTransformation&, > std::__1::basic_string<char, std::__1::char_traits<char>, > std::__1::allocator<char> >&, unsigned char) in libA.a(asn.o) > ... > I have done a lipo -info on my library and it does contain the arm64 > architecture. Any idea's on what could be causing this? Appreciate the > help. >
It looks like the Crypto++ library was _not_ built against LLVM's libc++. Instead, it was built against GNU's libstdc++. The sign of that is LLVM's anonymous namespace "__1". To resolve the issue, add -stdlib=libc++ to CXXFLAGS. You might also be interested in http://www.cryptopp.com/wiki/IOS_(Command_Line) . The short of it is, start with 'setenv-ios.sh': $ . ./setenv-ios.sh arm64 Configuring for iPhoneOS (arm64) XCODE_SDK: iPhoneOS7.1.sdk XCODE_DEVELOPER: /Applications/Xcode-5_1.app/Contents/Developer XCODE_TOOLCHAIN: /Applications/Xcode-5_1.app/Contents/Developer/usr/bin XCODE_DEVELOPER_TOP: /Applications/Xcode-5_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer IOS_ARCH: arm64 IOS_TOOLCHAIN: /Applications/Xcode-5_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ IOS_FLAGS: -miphoneos-version-min=7 IOS_SYSROOT: /Applications/Xcode-5_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk ******************************************************************************* It looks the the environment is set correctly. Your next step is build the library with 'make -f GNUmakefile-cross' ******************************************************************************* Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
