Re: Programming with gtkmm: problem with Arcs and Circles, Clock examples
- From: Marko Anastasov <marko marko anastasov name>
- To: Jonathon Jongsma <jonathon jongsma gmail com>
- Cc: gtkmm <gtkmm-list gnome org>
- Subject: Re: Programming with gtkmm: problem with Arcs and Circles, Clock examples
- Date: Fri, 27 Apr 2007 18:59:43 +0200
У пет, 27. 04 2007. у 11:38 -0500, Jonathon Jongsma пише:
> 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)
>
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]