469,354 Members | 2,035 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,354 developers. It's quick & easy.

_POSIX_C_SOURCE

Hi,

I would like to know the difference between using the
C_INCLUDE_PATH and using the -I option with compilers. How are they
different?

The problem which I am facing is that I am having a
source base which uses python. I am currently enabling compile time
option _POSIX_C_SOURCE in my Makefile. The compilaiton fails if i
include -I option to /usr/include/python2.4

/usr/include/python2.4/pyconfig-32.h:838:1: error: "_POSIX_C_SOURCE"
redefined

but if i do

export C_INCLUDE_PATH=/usr/include/python2.4

I do not face any compilation issues.

I would like to know if there is anything i am missing on this.

Regards,
Madhur
Jun 27 '08 #1
1 1170
Madhur <ma********@gmail.comwrote:
I would like to know the difference between using the
C_INCLUDE_PATH and using the -I option with compilers. How are they
different?
No idea on that - I always just use -I
The problem which I am facing is that I am having a
source base which uses python. I am currently enabling compile time
option _POSIX_C_SOURCE in my Makefile. The compilaiton fails if i
include -I option to /usr/include/python2.4

/usr/include/python2.4/pyconfig-32.h:838:1: error: "_POSIX_C_SOURCE"
redefined

but if i do

export C_INCLUDE_PATH=/usr/include/python2.4

I do not face any compilation issues.

I would like to know if there is anything i am missing on this.
Do it in your code with

#define _POSIX_C_SOURCE

instead of the Makefile, and do it after the #include "Python.h"

--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Marc Schellens | last post: by
3 posts views Thread by Belyh G.P. | last post: by
7 posts views Thread by rwr | last post: by
2 posts views Thread by sndive | last post: by
5 posts views Thread by nazgul | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.