thank you.
Unfortunately vc10 is the one and only enterprise-wide used compiler so I 
really have no chance to use gcc at work.
So I'll follow your advice and try it like 1999 ;)

>
> On 25.04.2012, at 18:18, testalucida wrote:
>
> > Hi,
> >=20
> > this code:
> >=20
> > Fl_Button *pBtn =3D new Fl_Button(...);
> > pBtn->callback( [](Fl_Widget *w, void *u ) {printf(...);} );
> >=20
> > compiles fine with gcc but won't with vc10.
> > Error message says something like "can't convert lambda to =
> Fl_Callback*".
> >=20
> > Does anybody know the reason? Is there a way to use lambdas with FLTK =
> callbacks on Windows?
>
> Yes. The VC2010 compiler does not support local functions. One more =
> reason to use gcc on MSWindows. VC2010 uses an ancient single pass =
> concept and does not implement all the new standards, or if it does, it =
> diverges from the standard just enough to make life miserable. Try =
> writing C++ like it was 1999, and VC may understand you better.=
>

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to