471,872 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,872 software developers and data experts.

_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 1221
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
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.