> On 18.03.2010, at 07:52, Matthias Melcher wrote:
> >
> > On 18.03.2010, at 00:22, Albrecht Schlosser wrote:
> >
> > Still, it bugs me that it doesn't work "out of the box".
>
> Well, it did! After you finished your code it worked. The trouble
> began when Manolo moved code around and removed the Fl_Gl_Printer
> class (which was okay). IMHO it is only a technical problem now.
> If you don't reference an object module, the linker won't link it
> into your executable. And that is what happened here.
>
> > At least it does not crash. I will have to come up with some code that will 
> > make sure that a plugin is always instantiated.
>
> Hmm, the problem I had when I tried to force this was that the
> Fl_Gl_Device_Plugin class is only declared in Fl_Gl_Device_Plugin.cxx,
> thus I couldn't make an external reference to it. That would have
> pulled it in, I guess. My second patch tried to do it by calling an
> additional function *in* the module that returned the plugin name.
>
> I still don't know why this didn't work, since it returned the
> correct name, so that the plugin must have been loaded at that
> time. Maybe I'll give that another try with your verbose
> Fl_Plugin code that we have now.
>
> Albrecht

I doubt the problem comes from my removing of the Fl_Gl_Printer class.
The thing is linked in:
Fl_Plugin: adding plugin named "opengl.device.fltk.org" at 0x004610B4
the problem is that it is lost afterwards:
Fl_Plugin: returning plugin named "opengl.device.fltk.org": 0x00000000

Also the same code compiled with gcc cross-compiler/cross-linker works,
whereas it fails with gcc on msys+mingw+XP.
There is probably a very subtle bug in the plugin code.

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

Reply via email to