Re: Difficulty Compiling Tutorial Examples on Linux

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
Previous Message ]New Message | Reply ]Next Message ]

Re: Difficulty Compiling Tutorial Examples on Linux Anonymous Feb 14, 2006 top right image
Did you ever resolve this problem?  I have had similar crashes.

Lloyd Miller (

> I compiled fltk-1.1.6 on Slackare 10 using gcc-3.3.4 and installed it in /usr. I also have fltk-1.0.11 installed in /usr/local/bin compiled with gcc-2.95.3 for use with POSE, the old Palm emulator. Both compiled fine and coexist happily on the same system. POSE comiled, installed and runs OK.
> I tried to compile this example program against fltk-1.1.6 and it failed. Firstly, there is a problem with box->labeltype(FL_SHADOW_LABEL);
> I looked in the header files and couldn't find FL_SHADOW_LABEL, but I did find _FL_SHADOW_LABEL. Using that introduces a new breakage into the program. (I am not a C++ expert, I am trying to learn and decided to try fltk since it looked fairly simple.)
> I commented out that line and got the program to compile using fltk-config --compile hello.cxx
> When I try to run the program, a window outline appears very briefly and I get a segfault. I am using the correct fltk-config (i.e. the one for fltk-1.1.6).
> If I run the program in gdb I get a window and the following:
> <br>
> (gdb) run<br>
> Starting program: /home/iain/c/fltk/hello <br>
> <br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> 0x080540e0 in fl_draw ()<br>
> <br>
> (gdb) backtrace <br>
> #0  0x080540e0 in fl_draw ()<br>
> #1  0x080547b9 in fl_draw ()<br>
> #2  0x080554b7 in fl_normal_label ()<br>
> #3  0x0805558a in Fl_Label::draw ()<br>
> #4  0x08055756 in Fl_Widget::draw_label ()<br>
> #5  0x080556f0 in Fl_Widget::draw_label ()<br>
> #6  0x080556a9 in Fl_Widget::draw_label ()<br>
> #7  0x0804da1d in Fl_Group::draw_child ()<br>
> #8  0x0804d8bf in Fl_Group::draw_children ()<br>
> #9  0x0804ed26 in Fl_Window::draw ()<br>
> #10 0x0804c51f in Fl_Window::flush ()<br>
> #11 0x0804b4b1 in Fl::flush ()<br>
> #12 0xbffff6c4 in ?? ()<br>
> #13 0xbffff628 in ?? ()<br>
> #14 0x00000001 in ?? ()<br>
> #15 0x00000000 in ?? ()<br>
> #16 0x40014900 in ?? () from /lib/<br>
> #17 0xbffff628 in ?? ()<br>
> #18 0x0804b0f5 in Fl::wait ()<br>
> Previous frame inner to this frame (corrupt stack?)<br>
> <br>
> I have also tried it with fltk-1.1.5.
> I tried writing my own makefile to compile the program and got a completely different binary (a fraction of the size) that segfaults immediately on running:
> (gdb) run<br>
> Starting program: /home/iain/c/fltk/hello <br>
> <br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> 0x403d56e5 in mallopt () from /lib/<br>
> (gdb) backtrace<br>
> #0  0x403d56e5 in mallopt () from /lib/<br>
> #1  0x403d4883 in malloc () from /lib/<br>
> #2  0x0804ac1a in operator new ()<br>
> #3  0x08049d8f in main ()<br>
> (gdb)<br>
> <br>
> Can someone please tell me what I have done wrong?
> Thank you very much.

Direct Link to Message ]
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.