C言語への埋め込み

を参考にとりあえずビルドまで。

# test.c
#include <stdio.h>
#include "Python.h"

int main(void)
{
    Py_Initialize();
    PyRun_SimpleString("print 'hello python'");
    Py_Finalize();
    return 0;
}
C:\temp\python>gcc test.c -IC:\Python25\include C:\Python25\libs\python25.lib -o test

C:\temp\python>test
hello python