newbie embedding Python2.0 in C

Alex Martelli aleaxit at yahoo.com
Mon Nov 20 21:24:48 CET 2000


"Marty Serschen" <mserschen at kw.igs.net> wrote in message
news:3A18AB7C.81E82F33 at kw.igs.net...
> Greetings,
>
> I'm attempting to embed a few lines of Python, nowhere near anything
> fancy, into a C project (compiled with Metroworks CodeWarrior on WinNT)
    [snip]
> but I'm not having any success compiling.  I'm following a "Hello World"
> example straight out of a text, and although I've included the Python.h
> header file, as required, the compiler complains that Py_Initialize() is
> undefined.
>
> I'm using Python version 2.0 on WinNT.  I've obviously neglected to do
> something important if the compiler can't find the functions, but I
> don't know what it is that I've missed.  Any help would be appreciated.

It's sure to be a CW-vs-VisualC++ issue; the Python version for
Win32 is tuned for Microsoft Visual C++ and may sometimes take
some effort to adapt it to other C compilers for that platform.

I'm unfortunately unable to provide any CW-specific advice, but
it's likely you may need some tweaking in or around config.h...


Alex







More information about the Python-list mailing list