Re: Programming with gtkmm: problem with Arcs and Circles, Clock examples



On 4/27/07, Wenzel <wgwenzel t-online de> wrote:
The example applications "Drawing Arcs and Circles" and "Creating a
Clock with Cairo" won't compile (under Windows XP, only !?).

"M_PI" isn't defined.

Inserting "#define pi 3.14159265359" (compare
http://www.gtkmm.org/docs/gtkmm-2.4/examples/gdk/radar.cc)
or - more C++ish - "const double pi = 3.14159265359;" fixes this issue.

I was under the impression that M_PI was pretty standard.  Is it just
a matter of a missing include (i.e. does it work if you explicitly
include <cmath>)?  Or alternately what about changing it from M_PI to
G_PI (which is defined by glib I believe, so should be available on
windows and linux)

--
jonner



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