简体   繁体   中英

How to call C++ functions from Python code in linux?

I want to call functions of a C++ program from Python code.

How can make C++ functions available in a Python program?

http://www.boost.org/doc/libs/1_47_0/libs/python/doc/

Boost.Python, a C++ library which enables seamless interoperability between C++ and the Python programming language.

You can find a simple example of Python's native C API (works just as well for C++) here

If you deal with numerical calculations and you use numpy in your python code, you should consider numpy's extensive additions to the C API ( manual )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM