schaumermal 0 Posted October 7, 2022 (edited) Hello, When I try to compile an App for the IOS Simulator (11.2 Pach 1) I get the following message: [DCC Fehler] E2597 ld: in libcrypto.a(a_int.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 in the uses section i have the following: uses ........ // ############# IdSSLOpenSSLHeaders, {$IFDEF IOS} {$IFDEF CPUARM} // IOS Device IdSSLOpenSSLHeaders_Static, {$ELSE} // IOS Simulator IdSSLOpenSSLHeaders, {$ENDIF} {$ENDIF} System.IOUtils, IdTCPClient;// It works fine on my Android Device and on my iPad. But i'm not able to compile it for the IOS simulator 😞 Edited October 7, 2022 by schaumermal Share this post Link to post
Remy Lebeau 1391 Posted October 7, 2022 (edited) 6 hours ago, schaumermal said: When I try to compile an App for the IOS Simulator (11.2 Pach 1) I get the following message: [DCC Fehler] E2597 ld: in libcrypto.a(a_int.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 Have you read Embarcadero's documentation yet? Creating an iOS App: OpenSSL_Support libcrypto.a is a static library for iOS devices, but for the iOS Simulator you need the dynamic library libcrypto.dylib instead Quote in the uses section i have the following: Why are you including the IdSSLOpenSSLHeaders unit twice? Try this instead: uses ... IdSSLOpenSSLHeaders, {$IFDEF IOS} {$IFDEF CPUARM} IdSSLOpenSSLHeaders_Static, {$ENDIF} {$ENDIF} System.IOUtils, IdTCPClient; Which can be simplified using {$IF} instead: uses ... IdSSLOpenSSLHeaders, {$IF DEFINED(IOS) AND DEFINED(CPUARM)} IdSSLOpenSSLHeaders_Static, {$ENDIF} System.IOUtils, IdTCPClient; Edited October 7, 2022 by Remy Lebeau Share this post Link to post
schaumermal 0 Posted October 8, 2022 Hello and thank you for this information. If I understood it correctly, I have to remove ibcrypto.a and libssl.a from the deployment for the simulator (-> done). Then i have to copy the files (libcrypto.dylib and libssl.dylib)from the MacBook to my development system and include them like i have done for IOS with libcrypto.a and libssl.a. BUT i could not fin find these two files on my MacBook Air 😞 I only found libcorecrypto.dylib, or libcommonCrypto.dylib. libssl.dylib was not found 😞 Share this post Link to post
Remy Lebeau 1391 Posted October 8, 2022 10 hours ago, schaumermal said: Then i have to copy the files (libcrypto.dylib and libssl.dylib)from the MacBook to my development system and include them like i have done for IOS with libcrypto.a and libssl.a. BUT i could not fin find these two files on my MacBook Air 😞 Building OpenSSL dylibs for iOS simulator 2 Share this post Link to post
schaumermal 0 Posted October 11, 2022 btw {$IF DEFINED(IOS) AND DEFINED(CPUARM)} this doesen't work anymore with the new simulator 😉 Share this post Link to post
Rollo62 534 Posted October 11, 2022 (edited) Maybe it helps what Uwe suggests in the German DP. Check according to Delphi Compiler - Conditions simply enter $(Platform) and in the program check with {$IFDEF iOSSimARM64 } https://docwiki.embarcadero.com/RADStudio/Sydney/en/Memory_Management Edited October 11, 2022 by Rollo62 Share this post Link to post
Dave Nottage 554 Posted October 11, 2022 1 hour ago, schaumermal said: this doesen't work anymore with the new simulator Please refer to this QP report: https://quality.embarcadero.com/browse/RSP-39702 1 Share this post Link to post
Remy Lebeau 1391 Posted October 11, 2022 Based on the QP ticket, looks like this could work: {$IF DEFINED(IOS) AND NOT DEFINED(IOSSIMULATOR)} Share this post Link to post