Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   iOS Wie kann ich eine unter C++ compilierte Static-Library für iOS deployen? (https://www.delphipraxis.net/207593-wie-kann-ich-eine-unter-c-compilierte-static-library-fuer-ios-deployen.html)

philipp.hofmann 12. Apr 2021 15:34


Wie kann ich eine unter C++ compilierte Static-Library für iOS deployen?
 
Hi,

für Windows deploye ich ein dll-Datei via Project-Deployment-Settings in den Remote-Path .\ und importiere die Funktionen:
Delphi-Quellcode:
  function initANTplus(): boolean; cdecl; external ANTplusLib;
Für MacOS deploye ich die dylib-Datei via Project-Deployment-Settings in den Remote-Path Contents\MacOS\ und importiere die Funktionen folgendermaßen:
Delphi-Quellcode:
    handle:=LoadLibrary(PChar(IncludeTrailingPathDelimiter(libPath)+ANTplusLib));
    if (handle<>0) then
    begin
      @initANTplus:=GetProcAddress(handle,'initANTplus');
Aber wie erfolgt dies für iOS. Ich habe jetzt die static-Library (libAntPlusConnector.a) kompiliert, aber wie deploye ich diese mit meiner Delphi-App?
Ich gehe davon aus, dass ich die Funktionen analog zu MacOS importiere (nur ohne Pfadangabe bei LoadLibrary), aber aktuell findet er die Library einfach nicht:
Delphi-Quellcode:
    handle:=LoadLibrary(PChar(ANTplusLib));
    if (handle<>0) then
    begin
      @initANTplus:=GetProcAddress(handle,'initANTplus');
Wo muss ich die Datei libAntPlusConnector der Anwendung bekannt machen?

Grüße, Philipp

philipp.hofmann 12. Apr 2021 19:29

AW: Wie kann ich eine unter C++ compilierte Static-Library für iOS deployen?
 
Ich binde es jetzt statisch ein, also genau wie unter Windows und nicht wie unter MacOS, da komme ich schon mal einen Schritt weiter.

Rollo62 13. Apr 2021 08:17

AW: Wie kann ich eine unter C++ compilierte Static-Library für iOS deployen?
 
Ich glaube iOS lässt gar keine dynamisch geladenen Libraries zu, meine das mal gelesen zu haben.
Das wäre eine prinzipielle Vorgabe von Apple, um irgendwelches Skripting, Nachladen von Code, o.ä. zu unterbinden.

Es dient immer Alles nur der Sicherheit (und dem Brandschutz ) :stupid:


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz