Process.LoadLibrary
-------------------

Loads a given native library.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Process](component_Process.md) | [6.5](newinversion65.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Process.LoadLibrary"; Path ) 

**MBS**( **"Process.LoadLibrary";** /\* Loads a given native library. \*/  
**$Path**) /\* The native path to the library.e.g. "C:\\Users\\Christian\\Desktop\\dynapdf.dll" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The native path to the library. | "C:\\Users\\Christian\\Desktop\\dynapdf.dll" |

### Result

Returns OK or error.

### Description

Loads a given native library.  
This can be used to resolve dependencies with libraries in various places.  
This should work with .dll files on Windows, .dylib files on macOS and .so files on Linux.  
  
Windows error 193 means that 64-bit FileMaker tried to load 32-bit library or 32-bit FileMaker tried to load 64-bit library. The bit level must match between app and library. For macOS the error message will tell you about wrong architecture.  
  
If you like to interface with functions in the DLL, please use [CFunction](component_CFunction.md) functions.  
  
If you have trouble with DLLs not loading on Windows, please check if you have new Visual Studio Runtime libraries installed. If you need more than one DLL, please use [Process.SetDllDirectory](ProcessSetDllDirectory.md) to point to the folder to find the DLL files.  
  
On Linux if you get the error wrong ELF class: ELFCLASS32 if you try to load a 32-bit library into a 64-bit application. You may also get errors about version GLIBC\_2.25 or similar if your libc library on the Linux installation isn't new enough for the loaded library.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use [FileDialog](component_FileDialog.md) functions.  
For Server be aware that server has limited permissions and may not be able to access all files on a computer.  
### Examples

Load a library:

 Set Variable \[ $r ; Value:MBS ("Process.LoadLibrary"; "C:\\Users\\Christian\\Desktop\\dynapdf.dll") \]  
Test whether the mySQL library loads:

 MBS ( "Process.LoadLibrary"; "/Users/cs/Desktop/mysql-8.4 .4-macos15-x86\_64/libmysqlclient.24 .dylib" )  
Test whether the mySQL library loads for macOS with Apple Silicon:

 MBS ("Process.LoadLibrary"; "/Users/cs/Desktop/mysql-8.4 .4-macos15-arm64/libmysqlclient.24 .dylib")  
### See also

- [Barcode.LoadLibrary](BarcodeLoadLibrary.md)
- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)
- [Process.GetDllDirectory](ProcessGetDllDirectory.md)
- [Process.SetDllDirectory](ProcessSetDllDirectory.md)

### Example Databases

- [Barcode/Barcode Detection](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Barcode%20Detection.shtml#5ScriptAnchor_)
- [Barcode/Barcodes from Invoices](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Barcodes%20from%20Invoices.shtml#4ScriptAnchor_)
- [Barcode/Swiss QR-Code for invoices/Swiss QR-Code for invoices ISO 20022](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Barcode/Swiss%20QR-Code%20for%20invoices/Swiss%20QR-Code%20for%20invoices%20ISO%2020022.shtml#21ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 6.5pr6](https://www.mbsplugins.de/archive/2016-11-08/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th November 2016 , last changed 17th February 2026

  
[Process.LoadFramework](ProcessLoadFramework.md) - [Process.SetCurrentDirectory](ProcessSetCurrentDirectory.md)

[HTML Version](ProcessLoadLibrary.shtml)