C调Python出错‘Py_Initialize’未定义的引用,求解
系统:ubuntu 12.10 x64
python 2.7.3,已经安装了 python-dev
C代码如下:
python c ubuntu
#include <stdio.h>
#include <stdlib.h>
#include <python2.7/Python.h>
int main(int argc, char** argv)
{
printf("Hello world!\n");
Py_Initialize();
PyRun_SimpleString("print "Hello world,Python!"\n");
Py_Finalize();
exit(0);
}