HemulGM / ChatGPT

ChatGPT Native Application (Windows, Mac, Android, iOS, and Linux)
https://hemulgm.github.io/ChatGPT/
MIT License
398 stars 50 forks source link

ChatGPT.Functions.pas won't compile on IOS #64

Closed Fab8573 closed 3 months ago

Fab8573 commented 4 months ago

Because of :

const LibExtMask = {$IFDEF MSWINDOWS} '.dll'; {$ENDIF} {$IFDEF LINUX} '.so'; {$ENDIF} {$IFDEF MACOS} '.o'; {$ENDIF} {$IFDEF IOS} '.o'; {$ENDIF} {$IFDEF IOS64} '.o'; {$ENDIF} {$IFDEF ANDROID} '.so'; {$ENDIF}

[DCC Erreur] ChatGPT.Functions.pas(16): E2029 Expected statement but constant string found.

Certainly because {$IFDEF MACOS} is active on both IOS and IOS64 :
https://docwiki.embarcadero.com/RADStudio/Athens/en/Conditional_compilation_(Delphi)

Same for IOS and IOS64 !

Maybe this could be better :

LibExtMask = {$IFDEF MSWINDOWS} '.dll'; {$ELSE IF DEFINED(LINUX)} '.so'; {$ELSE IF DEFINED(IOS64) } '.o'; {$ELSE IF DEFINED(IOS)} '.o'; {$ELSE IF DEFINED(MACOS)} '.o'; {$ELSE IF DEFINED(ANDROID)} '.so'; {$ENDIF}

HemulGM commented 4 months ago

Fixed