[Coin-discuss] Symbol not found loading libCoinMP from Python ctypes
Joshua Arnott
josh at snorfalorpagus.net
Fri Oct 10 17:57:23 EDT 2014
Hello,
I’m trying to use the CoinMP library from Python 3 via ctypes. When I try to load the shared library I get the following error:
Python 3.4.1 (default, May 19 2014, 13:10:29)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> lib = ctypes.CDLL('libCoinMP.dylib')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libCoinMP.dylib, 6): Symbol not found: _CbcOrClpRead_mode
Referenced from: /usr/local/lib/libCoinMP.dylib
Expected in: flat namespace
in /usr/local/lib/libCoinMP.dylib
However, when I “make test” everything runs correctly.
Output from “nm” reports the symbol is undefined:
U _CbcOrClpRead_mode
I am getting similar errors for the other libraries, e.g.:
Python 3.4.1 (default, May 19 2014, 13:10:29)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> ctypes.CDLL('libClp.dylib')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/ctypes/__init__.py", line 351, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(libClp.dylib, 6): Symbol not found: __ZN18CoinMessageHandler13checkSeverityEv
Referenced from: /usr/local/lib/libClp.dylib
Expected in: flat namespace
in /usr/local/lib/libClp.dylib
Running Mac OS X 10.9.5, with current CoinMP from SVN.
Kind regards,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20141010/22b8ba34/attachment.html>
More information about the Coin-discuss
mailing list