> This is my problem:
> Within GLWindow.h I have to include FL/Fl_Gl_Window.H since 
> I'm inheriting from it and it will compile and link as 
> expected.  But if I don't also include FL/Fl_Group.H and 
> FL/Fl_Window.H before FL/Fl_Gl_Window.H (in that order) I get 
> a segfault when I call show() on the main window.  Why do I 
> have to include all the header files for the objects that my 
> current object has inherited from in reverse order?  
> Shouldn't Fl_Gl_Window.H include Fl_Window.H then it include 
> Fl_Group.H since this is who inherits from who?
> 
> When I look within the Fl_Gl_Window.H file I see it does 
> include Fl_Window.H so why do I explicitly have to state to 
> include it again within my GLWindow.h file?


I can't reproduce this effect...

Can you post (on your website or somewhere) a compileable example of
what you are doing that manifests this behaviour?

Also, what platform are you on? What compilation tools are you using?

One thing that occurs to me... Do you maybe have fltk-1.1 installed, in
such a way that the compiler might be finding the 1.1 headers in
preference to the 1.3 headers in some cases?

If so, that would be *bad* as the headers have the same names and
*similar* but different widget definitions... So code will often compile
and link OK against the "wrong" headers but will segfault badly at
runtime. Might be what you are seeing?
If so, you'll need to segregate things a bit to keep it tidy!



SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to