[PYTHON] How to make a .dylib library from a .a library on OSX (El Capitan)

background

Shared libraries can be used in Python, Julia, Rust, etc. If it is an .a archive format library, it cannot be used as it is.

If you can convert an archived library to a shared library, these Available from language.

.dylib

/ usr / bin / libtool command, not GNU, genuine command The method is as follows

libtool -dynamic -multiply_defined suppress -o libmruby.dylib mruby/build/host/lib/libmruby.a -undefined dynamic_lookup -macosx_version_min 10.11

In this example, mruby is changed from archive format (.a) to shared library (.dylib).

When linking a library with rpath

You can also add other dependent libraries to the link. But in addition the library I wasn't sure what to do if it included the rpath specification, but I was able to override the rpath with install_name_tool and specify it as an absolute path.

Caution

It's not very Binary Anne, so it's not bright around here, so It just happens to move.

Recommended Posts

How to make a .dylib library from a .a library on OSX (El Capitan)
How to make a multiplayer online action game on Slack
How to make a Japanese-English translation
How to make a crawler --Advanced
How to make a recursive function
How to make a deadman's switch
[Blender] How to make a Blender plugin
How to make a crawler --Basic
[Python] How to make a class iterable
How to create a repository from media
How to make a Backtrader custom indicator
How to test on a Django-authenticated page
How to make a Pelican site map
How to run Cython on OSX Memo
How to make a process thread run only on a specific CPU core
How to make a dialogue system dedicated to beginners
How to open a web browser from python
How to create a function object from a string
How to make multiple kernels selectable on Jupyter
How to make a dictionary with a hierarchical structure.
How to make a QGIS plugin (package generation)
How to extract coefficients from a fractional formula
How to install OpenGM on OSX with macports
I read "How to make a hacking lab"
How to live a decent life on 2017 Windows
Build a Python environment with OSX El capitan
How to make a program to solve Rubik's Cube starting from PC Koshien 2014 Floppy Cube
How to deploy a Django application on Alibaba Cloud
How to install Linux on a 32bit UEFI PC
A memorandum on how to use keras.preprocessing.image in Keras
How to build a Django (python) environment on docker
How to make a Python package using VS Code
How to make a 3D geometric figure with one click [From triangular pyramid to fractal]
Basics of PyTorch (2) -How to make a neural network-
How to post a ticket from the Shogun API
How to take a captured image from a video (OpenCV)
How to run Django on IIS on a Windows server
How to build a Python environment on amazon linux 2
[Python] How to call a c function from python (ctypes)
How to create a kubernetes pod from python code
How to use GitHub on a multi-person server without a password
How to make a Cisco Webex Teams BOT with Flask
How to use Fujifilm X-T3 as a webcam on Ubuntu 20.04
A memo on how to easily prepare a Linux exercise environment
How to run a trained transformer model locally on CloudTPU
[Python] How to make a list of character strings character by character
How to build a new python virtual environment on Ubuntu
How to run a Python program from within a shell script
How to launch AWS Batch from a python client app
How to make a hacking lab-Kali Linux (2020.1) VirtualBox 64-bit Part 2-
Install openssl-1.0.2l on OSX El Capitan and update Python's _ssl.so
How to make a hacking lab-Kali Linux (2020.1) VirtualBox 64-bit edition-
How to generate a public key from an SSH private key
How to make a Python package (written for an intern)
A note on how to load a virtual environment in PyCharm
How to make a simple Flappy Bird game with pygame
Build a python data analysis environment on Mac (El Capitan)
How to register a package on PyPI (as of September 2017)
Notes on how to use marshmallow in the schema library
How to get a list of links from a page from wikipedia
How to call a function