473,763 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

_POSIX_C_SOURCE redefined (Problems with Python.h?)

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_SOURC E"
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.

Aug 22 '06 #1
1 2835
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>

--
Nick Keighley

Aug 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2440
by: Colin J. Williams | last post by:
PythonWin has been my favourite IDE for quite a while. When one right clicks on a .py file in the Windows Explorer, among the options are Open and Edit. The former is the default and executes Python, with the selected script. The latter activates the PythonWin editor, with the selected script. Since, most frequently, I wish to edit the script, or execute it with the debugger, I tried changing the default to Edit, using the Edit File...
1
12179
by: Marc Schellens | last post by:
Including Python.h I got the following warining warning: "_POSIX_C_SOURCE" redefined in Python.h: #define _POSIX_C_SOURCE 200112L in features.h (included from string):
7
8699
by: James | last post by:
Should be a simple question...not sure why this ISN'T having a problem: For x = 1 to 5 Dim y Next Shouldn't that fire a "Name Redefined" error the way this does: For x = 1 to 5 Dim y
1
3996
by: saksenaabhishek | last post by:
Hi Guys, I have some problem in compiling the following code, specially with MSVC++.Net2003 (Code works fine with GCC compiler) ========================================= template< typename PROTOCOL> class port:public smart::smart_port< typename PROTOCOL::transport::output::type, typename PROTOCOL::transport::input::type > { private:
0
5043
by: Myron Turner | last post by:
I'm using a child handler which I've used elsewhere on various systems, but currently I am getting this message: POSIX::WNOHANG redefined my handler is as follows: sub childhandler { while((my $retv = waitpid( -1, &POSIX::WNOHANG() ))>0) {
4
1500
by: deanfamily | last post by:
Here's the problem: I have a function that references another one in this manner: class circleType: public pointType so, pointType is redefined by circleType, thereby giving circleType access to all the functions in pointType if need-be. Here is the function I am using in pointType: void pointType::setCoords(double xCoord, double yCoord) { pointX = xCoord;
1
1297
by: Madhur | last post by:
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
34
5368
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> os.startfile("C:\Documents and Settings\Alex\My Documents\My
7
160
by: Alexandru Mosoi | last post by:
I'm using python's interpreter's to run various commands (like a normal shell). However if sources are modified changes are not reflected so I have to restart interpreter. Is there any way to avoid restarting this? example: import blah blah.Blah()
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.