I wrote a C
application which uses some python
code:
#include <Python.h>int main() { .... Py_Initialize(); PyRun_SimpleString("print('Hello World from Embedded Python!!!')"); Py_Finalize(); ...}
I'm on Windows
and I compile using gcc
in MinGW
:
gcc app.c -o C:\\app\\app.exe `pkg-config --cflags --libs python3`
Then I manually copy libpython3.8.dll
, which I find in MinGW
folder, in C:/app
, or app.exe
will say "libpython3.8.dll
not found"
I want that the main folder
contains only the executable
, so is there an option to say that libpython3.8.dll
will be in app/lib
and not in app
, or to embed libpython3.8.dll
into the executable
?