| 1 | initial version |
I obviously don't know your exact use case. First of all, this has nothing to do with Sage, it is really a Python question.
Embedding Python in C is explained here: https://docs.python.org/2/extending/embedding.html
Alternatively: instead of using Sage in your C/C++ program, you could reverse this and use your C/C++ program inside Sage. That is relatively easy using Cython.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.