An experiment demonstrates how to load and use Dynamsoft Barcode shared libraries by Python Ctypes.
Dynamsoft Barcode Reader for Python is implemented using CPython and has been released to pypi.org:
pip install dbrThe reason behind using Ctypes is to try another way to invoke C APIs in shared libraries in pure Python.
-
Build the CMake project
bridgewhich is located in the root directory of the project.# Windows cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. cmake --build . # Linux cmake .. cmake --build .
-
Get a valid license key from Dynamsoft website and update the line in
success.py.DBR_InitLicense(instance, c_char_p('LICENSE-KEY'.encode('utf-8')))
-
Run the
success.pyfile.python success.py