Python Embedding to C++ using static library

304 Views Asked by At

I want to use python code in C++ in an environment where we only have support for C++. It turns out that using python embedding, we can call python functions using C/C++. If I want to interpret python in C++, using python.h and libpython:

  1. Do I need to have python installed in the system to interpret the code at runtime?
  2. Can I use libpython as a static library, so it does not depend on any .so file?

I am looking for a minimal package of embedding that can run without a dynamic library and python environment.

0

There are 0 best solutions below