Calling C++ DLLs from Python

后端 未结 2 571
既然无缘
既然无缘 2021-02-09 18:17

I\'d like to know if it is possible to use ctypes to access C++ DLLs from Python and run functions (or class methods) from them.If not, is there another way to do this?

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-09 18:55

    This question has been answered many times (this one is an exact duplicate!)

    In summary, no you can't do it with Ctypes (yet) but there are a number of other code generators you could use to do the job. SWIG and Boost.Python are two of the most popular.

提交回复
热议问题