Using a dictionary to pass data to/from embedded python functions

Bill Pursell bill.pursell at gmail.com
Sun Aug 13 07:35:44 EDT 2006


Alex Martelli wrote:
>
> I wrote the following file za.c:

<sample code snipped>

> and proceeded to compile and execute as follows: [[Note: it does not
> matter that I'm using 2.5, the code is just as fine with previous
> versions -- it just happens that 2.5 is what I'm using right now in
> order to help out with 2.5's beta testing]]:
>
> brain:~/pyex alex$ gcc -c za.c -I/usr/local/include/python2.5
> brain:~/pyex alex$ gcc -o za za.o -L/usr/local/lib/python2.5/config/
> -lpython2.5
> brain:~/pyex alex$ ./za


I needed to include a lot more flags to make the example compile.
In particular:
-L /usr/local/lib/python2.4/config/ -lpython2.4 -lrt -lm -ldl -lutil

Why did you not need them?  Is this a misconfiguration on my
box, or something entirely different?  I've seen this type of thing
come up a lot, and I can't tell if it is simply the author omitting
flags for the sake of brevity, or if I'm actually missing something.

--
Bill Pursell




More information about the Python-list mailing list