我正在尝试编译嵌入了python脚本的c程序。
我尝试过:
i686-w64-mingw32-gcc -o embedded.exe -fPIC -I/usr/include/python3.6 - lpython3.6 ./program.c
我收到以下错误:
/usr/bin/i686-w64-mingw32-ld: cannot find -lpython3.6 collect2: error: ld returned 1 exit status
program.c来源:
int main(int argc, char *argv[]) {
Py_SetProgramName(argv[0]);
Py_Initialize();
PyRun_SimpleString("print("hello world!")");
Py_Finalize();
return 0;
}