У пет, 27. 04 2007. у 11:38 -0500, Jonathon Jongsma пише: > On 4/27/07, Wenzel <[EMAIL PROTECTED]> 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) >
I searched a bit now, M_PI is definitely not part of the C standard [1]. So G_PI is preferred then. Marko [1] http://c-faq.com/fp/mpi.html _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
