Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
As far as the program failing...this is a typical message from the log:
-------------- Run: Debug in Tutorial_04 (compiler: GNU GCC Compiler)---------------
Checking for existence: /home/gshosford/Documents/C++/C++01_Hr_Day/Ch_06/Workshop/Ch06_Exercises/Tutorial_04/bin/Debug/Tutorial_04
Set variable: LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu:
Executing: /home/gshosford/Documents/C++/C++01_Hr_Day/Ch_06/Workshop/Ch06_Exercises/Tutorial_04/bin/Debug/Tutorial_04 (in /home/gshosford/Documents/C++/C++01_Hr_Day/Ch_06/Workshop/Ch06_Exercises/Tutorial_04/.)
Process terminated with status -11 (0 minute(s), 4 second(s))
It returns "Process terminated with status -11 (0 minute(s), 4 second(s))" when i click the button to execute the code in in any of the three functions.
When I comment out the second line in the first function, as shown below, it returns the same error message.
void Tutorial_04Frame::OnButton1Click(wxCommandEvent& event)
{
FirstDialog dialog(this);
//dialog.ShowModal();
}
However, when I comment out the second line in the second function as shown below:
void Tutorial_04Frame::OnButton2Click(wxCommandEvent& event)
{
FirstDialog* dlg = new FirstDialog(this);
//dlg->Show();
}
it returns:
/home/gshosford/D... line 132 unused variable 'dlg' [Wunused-variable]
However, when I comment out the second line in the third function as shown below:
void Tutorial_04Frame::OnButton3Click(wxCommandEvent& event)
{
FirstFrame* frm = new FirstFrame(this);
//frm->Show();
}
it returns:
Process terminated with status -11 (0 minute(s), 4 second(s))
I am relatively new to C++ and wxWidgets.
I would like to learn to use the debugging tools. However, I have yet to find a resource such as a book or an online tutorial
FrcEtc wrote: ↑Fri May 20, 2022 6:20 pm
Thanks again for your help.
I have attached the zip forlder.
The auto-generated code is just wrong. I'm not sure if Code::Blocks or wxSmith is to blame, but if you're using the latest version of those, it's time to find a new IDE.
If you want to fix the code, even if it's just to see it run once: