Answer the question
In order to leave comments, you need to log in
Where to download Python.h and PyObject?
I am trying to run Python in C.
I don't understand where to connect Python.h, code:
#include <Python.h>
int main() {
// Загрузка интерпретатора Python
Py_Initialize();
// Выполнение команды в интерпретаторе
PyRun_SimpleString("print('Hello!')");
// Выгрузка интерпретатора Python
Py_Finalize();
}
File.c:(.text+0x5): undefined reference to `Py_Initialize'
/usr/bin/ld: File.c:(.text+0x16): undefined reference to `PyRun_SimpleStringFlags'
/usr/bin/ld: File.c:(.text+0x1b): undefined reference to `Py_Finalize'
Answer the question
In order to leave comments, you need to log in
Install Python sources. How exactly this is done depends on the operating system you are using.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question