[Python-bugs-list] [ python-Bugs-417508 ] 'hypot' not found with Borland C++Builde
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 19 Apr 2001 20:07:41 -0700
Bugs item #417508, was updated on 2001-04-19 19:11
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417508&group_id=5470
Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Stephen Hansen (ixokai)
Assigned to: Tim Peters (tim_one)
Summary: 'hypot' not found with Borland C++Builde
Initial Comment:
I'm working on getting Python to build in Borland
C++Builder, and the first problem i've run into is
that 'hypot' is undefined in mathmodule.c and thus
raises an error.
<br>
Adding the following to the top seems to fix it:
<pre>
#ifdef __BORLANDC__
extern double hypot (double, double);
#endif
</pre>
This should likely be a patch, I know. Sorry. :)
----------------------------------------------------------------------
>Comment By: Stephen Hansen (ixokai)
Date: 2001-04-19 20:07
Message:
Logged In: YES
user_id=200343
I am using Python 2.1, as just downloaded this morning.
PC/config.h defines HAVE_HYPOT at the top of the file, and
it is never undefined or modified in the rest. Apparently
this is not appropriate for the latest Borland compiler.
Since pyport.h already has the needed statement, adding
an '#undef HAVE_HYPORT' into the __BORLANDC__ section of
config.h will fix the problem.
BTW, I'm using the latest C++Builder5, which sets the value
of __BORLANDC__ to 0x055, if you wished to make the change
specific to this version and beyond of the compiler -- I
don't know if this problem existed in prior versions or not.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-04-19 19:48
Message:
Logged In: YES
user_id=31435
Which version of Python are you using? Try 2.1 first.
If it fails there, this must be solved in pyport.h rather
than by cluttering mathmodule.c with platform-specific
#ifdefs. Note that pyport.h already contains
#ifndef HAVE_HYPOT
extern double hypot(double, double);
...
#endif
So the real question appears to be why HAVE_HYPOT is
defined on your platform when it shouldn't be. Could you
please find out?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=417508&group_id=5470