Thanks for your reply Scott.
I've also found that it works if I place all the code into a single file 
although I did not mention it in my original post.

Another thought I've had is:
My Linux distribution comes with fltk version 1.1 installed for use by some 
other programs but I compile and link against version 1.3 which I've built in 
my project folder.  The fltk header files in version 1.3 such as 
FL/Fl_Gl_Window.H include Fl_Window.H in the following fashion.

#include "Fl_Window.H"

If it tries to to look where I have pointed it for the includes it will not 
find the file because my include path expects all fltk headers to prefixed with 
the FL directory.  Then if it defaults to look at the system level includes 
(i.e. /usr/include) it could potentially find a matching header name although 
for version 1.1.

For now I think I'll just place my GUI in one big file but what a pain.

Thanks,
Bryan



> > ... I get a segfault when I call show() ...
>
> I've found that when I have code split into different modules (as you
> have done), I sometimes get segfaults as I add widgets and do simple
> re-compiles. The link step finishes without errors and I get an
> executable, but I get a segfault as the objects are created or when I do
> the show().
>
> Doing a make clean usually solves the problem. So apparently one of the
> unchanged object modules is caching something it really shouldn't be.
>
> In your case, I wonder if adding the extra includes is causing something
> to move around. YMMV, but it's a quick thing to try.
>
> -Scott.
>

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

Reply via email to