| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Llama.LoadLibrary
Loads the library.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Llama | 16.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Llama.LoadLibrary"; Path ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| Path | The file path to the library. | "/opt/homebrew/Cellar/llama.cpp/6710/lib/libllama.dylib" |
Result
Returns OK or error.
Description
Loads the library.You need to load llama library before you can use it.
For Windows you need llama.dll, for macOS you need llama.dylib and for Linux you need llama.so.
On Windows you need to load ggml.dll, ggml-base.dll and llama.dll to have all functions.
Examples
Loads the library on macOS:
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "/opt/homebrew/lib/libllama.dylib") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to load library." ; $r ]
End If
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to load library." ; $r ]
End If
Load libraries on Windows:
# you need to update paths!
#
Set Variable [ $r ; Value: MBS( "Process.SetCurrentDirectory"; "C:\Users\cs\Desktop\llama-b7993-bin-win-cpu-x64") ]
#
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "ggml.dll") ]
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "ggml-base.dll") ]
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "llama.dll") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to load library." ; $r ]
End If
#
Set Variable [ $r ; Value: MBS( "Process.SetCurrentDirectory"; "C:\Users\cs\Desktop\llama-b7993-bin-win-cpu-x64") ]
#
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "ggml.dll") ]
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "ggml-base.dll") ]
Set Variable [ $r ; Value: MBS("Llama.LoadLibrary"; "llama.dll") ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to load library." ; $r ]
End If
See also
Example Databases
Blog Entries
This function checks for a license.
Created 10th February 2026, last changed 18th March 2026