Hmm, Mikhail, it works absolutely correctly without any errors on my system
(Windows Seven 64, VC2010 Express, Debug, latest svn rev 9631).
I'm afraid it's problem with your machine only. Which version of FLTK do you
use? Do you use something else? Be sure you don't mix headers and .lib files
from different versions of the library.
> This is happens in Debug build. It's actually
> "Debug Assertion Failed" showing that heap is
> corrupted. Stack is not useful. Going step by step
> I found that it happens after ~Fl_Window();
> xclass in Fl_Window is set to NULL.
> The program is here:
>
> #include <FL/Fl.H>
> #include <FL/Fl_Window.H>
> #include <FL/Fl_Box.H>
>
> //#include <vld.h>
>
> int main(int argc, char **argv) {
> // Fl_Window window(340,180);;
>
> Fl_Window *window = new Fl_Window(340,180);
> Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
> box->box(FL_UP_BOX);
> box->labelfont(FL_BOLD+FL_ITALIC);
> box->labelsize(36);
> box->labeltype(FL_SHADOW_LABEL);
> window->end();
> window->show(argc, argv);
> int ret = Fl::run();
> delete window;
>
> return 0;
> }
Nikita Egorov
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev