Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Loads the zbar library.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Barcode | 11.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Path | Native file path to the library. A dylib on macOS, a DLL file on Windows and a shard object on Linux wiht so extension. |
"/tmp/libzbar.so.0" |
Returns OK or error.
Load the zbar library on macOS:
MBS( "Barcode.LoadLibrary"; "/Users/cs/Desktop/zbar/libzbar.0.dylib" )
Load the zbar library on Linux:
MBS( "Barcode.LoadLibrary"; "/usr/lib/x86_64-linux-gnu/libzbar.so.0" )
// needs to install package on Linux:
// sudo apt-get install libzbar0
Load on various operation systems:
If [ MBS("IsWindows") ]
# you may need to download zbar from our Libs folder or get your own
# our copy of the library has a dependency, so we load libiconv first
Set Variable [ $path ; Value: "C:\Users\Christian\Desktop\libiconv.dll" ]
Set Variable [ $r ; Value: MBS( "Process.LoadLibrary"; $Path ) ]
# now we can load zbar dll
Set Variable [ $path ; Value: "C:\Users\Christian\Desktop\libzbar64-0.dll" ]
Else If [ MBS("isMacOS") ]
# you may need to download zbar from our Libs folder or get your own
Set Variable [ $path ; Value: "/Users/cs/Desktop/zbar/libzbar.0.dylib" ]
Else If [ MBS("isLinux") ]
# you may need to install first: sudo apt-get install libzbar0
Set Variable [ $path ; Value: "/usr/lib/x86_64-linux-gnu/libzbar.so.0" ]
Else
Show Custom Dialog [ "Unsupported platform" ; "No library coded for this platform or no MBS Plugin installed." ]
Halt Script
End If
#
# load zbar
Set Variable [ $r ; Value: MBS("Barcode.LoadLibrary"; $path) ]
If [ MBS("IsError") ]
Show Custom Dialog [ "Failed to load library" ; $r ]
End If
This function checks for a license.
Created 23th May 2021, last changed 12nd January 2024