_POSIX_C_SOURCE redefined (Problems with Python.h?)

Discussion in 'C Programming' started by irfanhab, Aug 23, 2006.

  1. irfanhab

    irfanhab Guest

    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.
     
    irfanhab, Aug 23, 2006
    #1
    1. Advertisements

  2. irfanhab wrote:

    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>
     
    Nick Keighley, Aug 23, 2006
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.