I have a codebase where I use some hand-written C++ code. The C++-code includes the line
#include "gzstream.h"
It seems like the code in that header gets mangled, because when I try to run the code I get errors like:
ImportError: dlopen(/Users/endrebakkenstovner/anaconda3/lib/python3.8/site-packages/epic2-0.0.48-py3.8-macosx-10.9-x86_64.egg/epic2/src/cpp_read_files.cpython-38-darwin.so, 2): Symbol not found: __ZN12gzstreambaseD0Ev
Referenced from: /Users/endrebakkenstovner/anaconda3/lib/python3.8/site-packages/epic2-0.0.48-py3.8-macosx-10.9-x86_64.egg/epic2/src/cpp_read_files.cpython-38-darwin.so
Expected in: flat namespace
(Symbol not found: __ZN12*gzstreambaseD0Ev)
Is there a way to tell Cython about that header file to avoid name mangling?
Here is the line where I require gzstream.h: https://github.com/biocore-ntnu/epic2/blob/master/epic2/src/read_files.cpp#L202
Is there a way to make Cython aware of it in a pxd-file or something?