Skip to content
Advertisement

Tag: cpython

compile official doc “Embedding Python in Another Application” example failed

I am trying to compile and run the example from https://docs.python.org/3/extending/embedding.html#very-high-level-embedding , but failed. My environment is Ubuntu 20.04.2 LTS, with system shipped python3.8(statically built), libpython3-dev and libpython3.8-dev packages installed. What I’ve tried: main.c : From https://docs.python.org/3/extending/embedding.html#compiling-and-linking-under-unix-like-systems, get gcc flags. (I don’t know why python3-config output has some duplicated values, that’s not a typing mistake) gcc {copy cflags output} -o

Advertisement