How to use Foreign Function Interface (FFI) in Python
How to use Foreign Function Interface (FFI) in Python.
Please refer to my blog.
gcc -shared -o libmyutils.so libmyutils.c;./myutils.py
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.28)
Target: x86_64-apple-darwin20.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ python --version
Python 3.9.0