Use Python code in C/C++

前端 未结 1 1011
傲寒
傲寒 2020-12-16 18:34

I\'m working in an embedded Linux environment and I have some Python code which I would like to use. My Python code is just doing some math, not using any library other than

相关标签:
1条回答
  • 2020-12-16 18:38

    Embedding the CPython interpreter into a C or C++ program is actually pretty straightforward.

    The official documentation has some complete examples.

    Also, check out SWIG and Boost.Python.

    0 讨论(0)
提交回复
热议问题