Open Foram16 opened 5 years ago
Initially the Traceback was:
Traceback (most recent call last): File "example_pke.py", line 10, in <module> _pqc =ctypes.CDLL('/home/electrical/Downloads/HElib/src/pke.so') File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/electrical/Downloads/HElib/src/pke.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE
the error occurs while loading the dynamically linked object.
import ctypes
_pqc=ctypes.CDLL('/home/electrical/Downloads/HElib/src/pke.so')
command used to create a shared object : g++ -g -O2 -std=c++11 -pthread -DFHE_THREADS -DFHE_BOOT_THREADS -fmax-errors=2 -fPIC -shared -o pke.so pke.cpp
I'am writing a python wrapper for a simple encryption decryption code using ctypes. The wrapper code is throwing an error.
Traceback (most recent call last): File "example_pke.py", line 10, in <module> _pqc=ctypes.CDLL('/home/electrical/Downloads/HElib/src/pke.so') File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: /home/electrical/Downloads/HElib/src/pke.so: undefined symbol: _Z16writeContextBaseRSoRK10FHEcontext
I compiled the .cpp as : g++ -g -O2 -std=c++11 -pthread -DFHE_THREADS -DFHE_BOOT_THREADS -fmax-errors=2 -fPIC -shared -o pke.so pke.cpp.