Re: M_PI not being found in math.h with gtk



On Thu, 2007-02-01 at 16:45 -0500, zentara wrote:
> However, when I use the gtk libs
> ----------------------------------------------------------------
> #include <math.h>                                                            
> #include <gtk/gtk.h>                                                         
>                                                                              
> int  main (){                           
>                                                                     
>   g_print("%f\n",M_PI);                                                      
>                                                                              
> return 0;                                                                    
> }  
> -------------------------------------------------------------
> 
> I get errors
>  error: ‘M_PI’ undeclared 

Works fine here.  Which libc are you using?  What compiler flags?

Ed




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