_POSIX_C_SOURCE redefined (Problems with Python.h?)

I

irfanhab

Hey guys!

I am having some serious problems integrating Python and C, and it's
strange. Putting it simple, Just as I include Python.h in my C programe
(without any further python interfacing code), and compile my C code
with the options -I /usr/include/python2.4 -lpython2.4 too gcc, I get
the following "warning"

=====
In file included from /usr/include/python2.4/Python.h:8,
from bwfloprating.c:4:
/usr/include/python2.4/pyconfig.h:835:1: warning: "_POSIX_C_SOURCE"
redefined
In file included from /usr/include/string.h:26,
from /root/simgrid/include/xbt/sysdep.h:14,
from bwfloprating.c:2:
/usr/include/features.h:190:1: warning: this is the location of the
previous definition
=====

The programe compiles, but when I run it, it causes a segmentation
fault at a point, and doesn't do anything useful. If I remove Python.h,
and the options to gcc, the code compiles and runs fine (but then I am
not able to call a python script from within my C code, which I need to
do).

Got any idea what the above warning is all about?

Thanks.
 
N

Nick Keighley

irfanhab wrote:

I am having some serious problems integrating Python and C,

I think you'd be better off in a pyton news group, this isn't really
the sort
of thing comp.lang.c deals with.

<snip>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top