Using static Python (pythoncore.lib)

132 Views Asked by At

I have create python static lib (pythoncore.lib) from Python27. It's size 11.2 Mb. I have simple app with python embedded:

#include <Python.h>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>


int main()
{
Py_Initialize();
PyRun_SimpleString("print 'Hello World'");
PyRun_SimpleString("for i in range(5):\n"
"\tprint i,\n");

Py_Finalize();
getch();
return 0;
}

I use Python/C API to execute python script in programm written on C++. But I want that my programm will work on computers, where Python not installed. For that I want to pack pythoncore.lib in my .exe How I can do this?

0

There are 0 best solutions below