Embedding Python in C, linking fails with undefined reference to `Py_Initialize’
Also add –embed to python3-config On Ubuntu 20.04, Python 3.8, I also needed to pass –embed to python3-config as in: gcc -std=c99 -ggdb3 -O0 -pedantic-errors -Wall -Wextra \ -fpie $(python3-config –cflags –embed) -o ‘eval.out’ \ ‘eval.c’ $(python3-config –embed –ldflags) otherwise -lpython3.8 is not added which leads to missing definitions. This is my test program: eval.c … Read more