Closed aztack closed 1 month ago
In the case of MacOS applications the webui-2.dylib dynamic library must be in the MyApplication.app/Contents/Frameworks directory.
In the case of MacOS applications the webui-2.dylib dynamic library must be in the MyApplication.app/Contents/Frameworks directory.
I also tried to place webui-2_debug.dylib and webui-2.dylib in above mentioned folder but got the same error:
I tried to load dylib with LoadLibrary and inspect error with GetLoadErrorStr
and found that the webui-2.dylib
is ofMach-O 64-bit dynamically linked shared library arm64
not x64 as expected. I change project target CPU to aarch64 and it works. (see https://github.com/webui-dev/webui/issues/482)
Maybe in function TWebUI.LoadWebUILibrary : boolean;
you can use GetLoadErrorStr
along with GetLastOSError
to get more detailed error information
I just added the error information in TWebUI and the Minimal demo shows it if the initialization fails.
I set a absolute dylib path to make sure it is exsits:
WebUI.LibraryPath := '/Users/name/github/WebUI4Delphi/bin64/webui-2_debug.dylib';
But in following function
FLibHandle is always zero.