Здравствуйте. Возникла проблема с линковкой библиотеки CryptoPRO CSP 4.9914. Внедрение библиотеки проводилось по инструкции из файла Readme.txt.
Приложение после подключения библиотеки собирается и запускается на симуляторе. Однако, если следовать пункту 7. В свойствах проекта настроить "Valid Architectures: armv7", "Architectures: Optimized(armv7)". проект на смартфоне запускаться не будет, т.к. отключена архитектура arm64.
Если попробовать добавить архитектуру arm64, возникает ошибка в которой говорится: ld: '/Frameworks/CPROCSP.framework/CPROCSP' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Далее, следуя предложению отключить Bitcode, после сборки появляются ошибки (154 штуки) типа символ не был найден для архитектуры arm64 - ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
XCode Version 8.3.3 (8E3004b)
Compiler for C/C++/Objective-C Apple LLVM 8.1
C++ Language dialect GNU++11 [-std=gnu++11]
C++ Standart library libc++ (LLVM C++ standart library with C++11 support)
iPhone 6 iOS 10.3.3
Undefined symbols for architecture arm64:
"_USE_CACHE_DIR", referenced from:
_use_documents_directory in CPROCSP
_make_csp_directories in CPROCSP
"std::runtime_error::what() const", referenced from:
vtable for CAException in CPROCSP
vtable for Asn1Exception in CPROCSP
vtable for CryptException in CPROCSP
vtable for Asn1DecodeException in CPROCSP
vtable for CAValidateException in CPROCSP
vtable for date_exception in CPROCSP
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char const*, unsigned long, unsigned long) const", referenced from:
_make_csp_directories in CPROCSP
+[PaneViewController parseVersion:version_out:build_out:] in CPROCSP
MSCAstdRequest::Submit(int, wchar_t*, wchar_t*, wchar_t*, int*) in CPROCSP
ExtractCert(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CPROCSP
MSCAstdRequest::GetCACertificate(int, wchar_t*, int, wchar_t**) in CPROCSP
MSCAstdRequest::RetrievePending(int, wchar_t*, int*) in CPROCSP
MSCAstdRequest::GetCAProperty(wchar_t*, int, int, int, int, void**) in CPROCSP
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Отредактировано пользователем 8 августа 2017 г. 14:56:14(UTC)
| Причина: Забыл указать устройство на которое производился билд приложения