help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave build issue -- error in fltk-backend.


From: Jordi Gutiérrez Hermoso
Subject: Re: octave build issue -- error in fltk-backend.
Date: Thu, 4 Nov 2010 11:06:19 -0600

2010/11/4 Kai Habel <address@hidden>:

> The problems seems to be that fltk1.3 includes X11/X.h. There is the
> following definition
>
> /* Polygon shapes */
>
> #define Complex                        0       /* paths may intersect */
> #define Nonconvex               1       /* no paths intersect, but not
> convex */
> #define Convex                  2       /* wholly convex */
>
> this collides with liboctave/oct-cmplx.h:
>
> #include <complex>
>
> typedef std::complex<double> Complex;
> typedef std::complex<float> FloatComplex;

And this is why macros suck. The compiler errors were completely
obscure about this. Good find.

I wish we could minimise them within Octave proper too. For the most
part, they are scarce, and I see that it's common practice to #undef
macros after they've served their purpose. I can see some places where
C++ constructs like namespaces or templates could replace macro use,
but people often find that harder to understand than a macro.
Thoughts?

- Jordi G. H.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]