如何从Python中访问C++ DLL中的函数,我所拥有的是一个包(一个头文件和一个DLL文件)

2024-04-25 14:36:40 发布

您现在位置:Python中文网/ 问答频道 /正文

现在我有一个C++(带类)二进制库(DLL文件)和一个头文件,没有库的源代码,那么我如何从Python访问DLL中的函数呢?在


Tags: 文件函数源代码头文件二进制dll
1条回答
网友
1楼 · 发布于 2024-04-25 14:36:40

您可能对增强感兴趣

The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools just your C++ compiler. It is designed to wrap C++ interfaces non-intrusively, so that you should not have to change the C++ code at all in order to wrap it, making Boost.Python ideal for exposing 3rd-party libraries to Python. The library's use of advanced metaprogramming techniques simplifies its syntax for users, so that wrapping code takes on the look of a kind of declarative interface definition language (IDL). Read more

或者喝一杯

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of target languages including common scripting languages such as Perl, PHP, Python, Tcl and Ruby. Read more.

<强>编辑:响应JSBeuno的注释:AcAK CcType不能与C++进行唯一接口,只有C.<

相关问题 更多 >