Code::Blocks Forums
User forums => Help => Topic started by: richrobin on October 10, 2016, 05:30:49 pm
-
Being new to Code::Blocks I decided to start with the wxSmith Tutorials. Tutorial 1 is a simple Hello World type of program where you first add a box sizer to the main window, then a panel, add another boxsizer to the panel then place some static text in it. If at that point you compile and run you get a segmentation error. The segmentation error occurs at the call to Setmenubar(MenuBar1). However looking back at the code that wxSmith created there is a statement just prior to calling Layout() that I could not understand the purpose of "SetSizer(BoxSizer2)" which I think sets the sizer for the main window to the sizer for the panel. I commented out SetSizer(BoxSizer2) and it compiles and runs as expected. The only problem is that when you go on to add the button wxSmith reintroduces this erroneous line of code.
Is this an initiation test ? I find it difficult to believe that wxSmith wasn't tested against its own tutorials. :o
I am using the current binary windows installer for codeblocks 16.1 with the mingw32 4.9.2 compiler wxWidgets is version 3.0.2
-
The only problem is that when you go on to add the button wxSmith reintroduces this erroneous line of code.
This is auto generated code, so if there is a bug in the generator, every time you chance something the bug will get introduced...
can you post a step by step guide to reproduce? Or a minimal example project?
-
The only problem is that when you go on to add the button wxSmith reintroduces this erroneous line of code.
This is auto generated code, so if there is a bug in the generator, every time you chance something the bug will get introduced...
can you post a step by step guide to reproduce? Or a minimal example project?
Remember to include the wxWidgets version information.
Tim S.