#include <python2.6/Python.h>
int main()
{
Py_Initialize();
PyRun_SimpleString("print /"hello, python c api/"");
Py_Finalize();
return 0;
}
gcc -o test test.c -lpython2.6
./test
#include <python2.6/Python.h>
int main()
{
Py_Initialize();
PyRun_SimpleString("print /"hello, python c api/"");
Py_Finalize();
return 0;
}