Can Cython code be compiled to a dll so C++ application can call it?

前端 未结 2 388
自闭症患者
自闭症患者 2020-12-31 05:53

I have a C++ program and it has sort of plugin structure: when program starts up, it\'s looking for dll in the plugin folder with certain exported function signatures, such

2条回答
  •  渐次进展
    2020-12-31 06:44

    I'd imagine it'd be difficult to call it directly, with Cython depending so much on the Python runtime.

    Your best bet is to embed a Python interpreter directly inside your app, e.g. as described in this answer, and call your Cython code from the interpreter. That's what I would do.

提交回复
热议问题