Skip to content Skip to sidebar Skip to footer

Undefined Symbol In Cython Module When Using Mlpack

I met the problem 'undefined symbol' when using mlpack in Cython. Here is my test case: cdef extern from '' namespace 'arma': ctypedef unsigned uword

Solution 1:

The extension must be linked to the library it is using.

setup(ext_modules=cythonize([Extension(
    "pca", ["pca.pyx"], language='c++'),
    libraries='mlpack',
]))

That all symbols can be found, and libraries linked correctly, can be checked by ldd <.so>.

See Compiling and Linking Cython documentation.

Post a Comment for "Undefined Symbol In Cython Module When Using Mlpack"