<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Seems I had to use ffi.manager.pas too. However when building then it fails with;<br></div><div><br></div><div>Undefined symbols for architecture arm64:<br></div><pre class="c-mrkdwn__pre"><div> "_ffi_call", referenced from:<br></div><div> _FFI.MANAGER_$$_FFIINVOKE$crc7AE31AA0 in ffi.manager.o<br></div><div> "_ffi_closure_alloc", referenced from:<br></div><div> _FFI.MANAGER$_$TFFIFUNCTIONCALLBACK_$__$$_CREATE$crc5C7D27E4 in ffi.manager.o<br></div><div> "_ffi_closure_free", referenced from:<br></div><div> _FFI.MANAGER$_$TFFIFUNCTIONCALLBACK_$__$$_DESTROY in ffi.manager.o<br></div><div> "_ffi_prep_cif", referenced from:<br></div><div> _FFI.MANAGER_$$_CREATECIF$crcD3E75E66 in ffi.manager.o<br></div><div> "_ffi_prep_closure_loc", referenced from:<br></div><div> _FFI.MANAGER$_$TFFIFUNCTIONCALLBACK_$__$$_CREATE$crc5C7D27E4 in ffi.manager.o<br></div><div> "_ffi_type_double", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_float", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_pointer", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_sint16", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_sint32", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_sint64", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_sint8", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_uint16", referenced from:<br></div><div> _FFI.MANAGER_$$_RECORDOROBJECTTOFFITYPE$PTYPEINFO$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_SETTOFFITYPE$INT64$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_uint32", referenced from:<br></div><div> _FFI.MANAGER_$$_RECORDOROBJECTTOFFITYPE$PTYPEINFO$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_SETTOFFITYPE$INT64$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_uint64", referenced from:<br></div><div> _FFI.MANAGER_$$_RECORDOROBJECTTOFFITYPE$PTYPEINFO$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_SETTOFFITYPE$INT64$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_uint8", referenced from:<br></div><div> _FFI.MANAGER_$$_RECORDOROBJECTTOFFITYPE$PTYPEINFO$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_SETTOFFITYPE$INT64$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> "_ffi_type_void", referenced from:<br></div><div> _FFI.MANAGER_$$_TYPEINFOTOFFITYPE$PTYPEINFO$TPARAMFLAGS$$PFFI_TYPE in ffi.manager.o<br></div><div> _FFI.MANAGER_$$_CREATECIF$crcD3E75E66 in ffi.manager.o<br></div><div>ld: symbol(s) not found for architecture arm64<br></div></pre><div><br></div><div>Is there something else I need to do to allow FFI to work on arm64? (Does this depend on a dylib? or a static library?, and do I need to explicitly reference that?)<br></div><div><br></div><div>On Wed, Aug 19, 2020, at 16:01, Carlo Kok via fpc-pascal wrote:<br></div><blockquote type="cite" id="qt" style=""><div>It looks like I misread the error completely, and presumed, from the include logic that it was x86_64 / x86 only. It compiles now, thanks!<br></div><div><br></div><div>On Wed, Aug 19, 2020, at 14:09, Sven Barth via fpc-pascal wrote:<br></div><blockquote type="cite" id="qt-qt" style=""><div dir="auto"><div><div class="qt-qt-gmail_quote"><div dir="ltr" class="qt-qt-gmail_attr">Carlo Kok via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Mi., 19. Aug. 2020, 13:17:<br></div><blockquote class="qt-qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><div>Hi,<br></div><div><br></div><div>for PascalScript FFI support, are there plans to support RTTI .Invoke, or any form of FFI available to do dynamic invoke from Pascalscript to FPC/api code?<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Rtti.Invoke is available in 3.2.0 however for all platforms except for Win64 and the register calling convention on i386 the libffi library is used. Officially libffi does not yet seem to support macOS on Aarch64 however it supports iOS, so you'll need to check whether you can get a variant working for macOS on Aarch64. <br></div><div dir="auto"><br></div><div dir="auto">Alternatively you'd need to implement a custom function call manager for Aarch64. <br></div><div dir="auto"><br></div><div dir="auto">Regards, <br></div><div dir="auto">Sven <br></div><div dir="auto"><div class="qt-qt-gmail_quote"><blockquote class="qt-qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;"><br></blockquote></div></div></div><div>_______________________________________________<br></div><div>fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br></div><div><a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br></div><div><br></div></blockquote><div><br></div><div>_______________________________________________<br></div><div>fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br></div><div><a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br></div><div><br></div></blockquote><div><br></div></body></html>