Am Dienstag, den 07.09.2010, 03:52 +0200 schrieb Uwe Stöhr:
> > why in cpp and not in header?
> 
> Because the compiler doesn't accept this.
> 
>  > the following patch doesn't link for you?
>  >
>  > -               line_style = line_solid, float line_width = 0.5) = 0;
>  > +               line_style = line_solid, float line_width = thin_line) = 0;
>  >
>  >         bool drawing_enabled_;
>  > +       static const float thin_line = 0.5;
> 
> This doesn't compile and moreover, I cannot use thin_line in GuiPainter.h:
> 
> D:\LyXSVN\lyx-devel\src\frontends/Painter.h(157) : error C2864: 
> 'lyx::frontend::Painter::thin_line' 
> : only static const integral data members can be initialized within a class
> d:\lyxsvn\lyx-devel\src\frontends\qt4\GuiPainter.h(45) : error C2248: 
> 'lyx::frontend::Painter::thin_line' : cannot access private member declared 
> in class 
> 'lyx::frontend::Painter'
> 
> regards Uwe

Fixed it: you must instantiate static members in the cpp file.

Peter


Reply via email to