DWQA QuestionsCategory: ProgramPython calls C + + extension
vsvsvsvs asked 1 month ago

They only provided.so file and. h header file definition.
How can Python provide better data encapsulation?
swig? or cython?
How to become a package extension.

2 Answers
Windoze answered 1 month ago

You can take a look.thisbar

Zhenbo_Li replied 1 month ago

You can’t write a C program to wrap the C + + library, and then use Python to call C

JackPy answered 1 month ago

Isn’t there a ready-made one in the official documents of Python? Please refer tohttp://docs.cython.org/src/userguide/wrapping_CPlusPlus.html