By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,162 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

_POSIX_C_SOURCE

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.