Problems building ddd on HPUX 11.31 IA64
Venkat <[email protected]> Fri, 24 Aug 2007 15:57:15 -0700
| Newsgroups | gmane.comp.debugging.ddd.bugs |
|---|---|
| Message-ID | <[email protected]> |
While building ddd version 3.3.11 on HPUX 11.31 with aCC Version A.06.15, I
ran into the following problem.
"ArcGraphE.C", line 50: error #2308: more than one instance of overloaded
functi
on "hypot" matches the argument list:
function "hypot(double, double) C"
function "hypot(float, float)"
function "hypot(long double, long double)"
argument types are: (const BoxCoordinate, const BoxCoordinate)
return hypot(p[X], p[Y]);
The function hypot is called in 3 files and I patched the three files as
provided under. Hope this is inline with what is intended. I did not make
the fix hpux specific as this should be compileable on all c++/g++
implementations
I also checked the latest code in CVS and this problem has not yet been
fixed
Thanks
Regards
Venkat
=====================================================================
diff -uNr ddd-3.3.11/ddd/ArcGraphE.C ../ddd-3.3.11/ddd/ArcGraphE.C
--- ddd-3.3.11/ddd/ArcGraphE.C 2004-06-07 04:52:52.000000000 -0700
+++ ../ddd-3.3.11/ddd/ArcGraphE.C 2007-08-23 18:45:54.000000000 -0700
@@ -47,7 +47,7 @@
inline double hypot(const BoxPoint& p)
{
- return hypot(p[X], p[Y]);
+ return hypot(double(p[X]), double(p[Y]));
}
// Compute the center of the arc enclosing P1, P2, and P3.
diff -uNr ddd-3.3.11/ddd/DispGraph.C ../ddd-3.3.11/ddd/DispGraph.C
--- ddd-3.3.11/ddd/DispGraph.C 2004-06-07 04:52:52.000000000 -0700
+++ ../ddd-3.3.11/ddd/DispGraph.C 2007-08-23 18:41:33.000000000 -0700
@@ -963,7 +963,7 @@
if (p == BoxPoint(0, 0))
return p;
- double length = hypot(p[X], p[Y]);
+ double length = hypot(double(p[X]), double(p[Y]));
double alpha = atan2(double(p[X]), double(p[Y]));
alpha += (2.0 * PI * angle / 360.0);
diff -uNr ddd-3.3.11/ddd/LineGraphE.C ../ddd-3.3.11/ddd/LineGraphE.C
--- ddd-3.3.11/ddd/LineGraphE.C 2004-06-07 04:52:53.000000000 -0700
+++ ../ddd-3.3.11/ddd/LineGraphE.C 2007-08-23 18:46:33.000000000 -0700
@@ -114,7 +114,7 @@
double radius = max(b.space(X), b.space(Y)) / 2;
if (radius > 0.0)
{
- double hyp = hypot(c[X] - p[X], c[Y] - p[Y]);
+ double hyp = hypot(double(c[X]) - double(p[X]), double(c[Y]) -
double(p[
Y]));
p[X] += BoxCoordinate((radius * (c[X] - p[X])) / hyp);
p[Y] += BoxCoordinate((radius * (c[Y] - p[Y])) / hyp);
=====================================================================
--
Regards
Venkat
_______________________________________________
bug-ddd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-ddd