On 18.03.2010, at 07:52, Matthias Melcher wrote:
>
> On 18.03.2010, at 00:22, Albrecht Schlosser wrote:
>
>> Another solution would probably be to put those about 120 LOC from
>> Fl_Gl_Device_Plugin.cxx in Fl_Gl_Window.cxx (or to #include that
>> file there), and that's it. ;-P
>
> Um, yes, that should do it.
>
> 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
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to