Thanks, Jens, for your prompt reply. As I mentioned, I was running EXACTLY the code that came from the CodeBlocks site when I clicked on "Create a new project" and selected a wxSlmith application. (Further experiments showed that F9 and the "Build and run" icon also usually built programs that would not close.) It did not occur to me that there was an error in this tiny bit of code which many people must have run.
But there is. At the very end, you will find the lines:
void helloFrame::OnClose(wxCloseEvent& event)
{
}
I realized that those lines looked like a close function that did not close, so I changed them to:
void helloFrame::OnClose(wxCloseEvent& event)
{
Close();
}
and now everything works well no matter how the "Build and run" is done. What I do not understand is why occasionally a build would would work properly, but I can proceed without understanding that.
I do hope you will want to add that line of code to save others the hours of frustration and perplexity its absence has cost me.
Thanks also for assigning me the exercise of finding out how to use the system monitor on Ubuntu 10.10 to kill a process. The answer is: Click "System" on the top bar; then "Administration", and then "System monitor". Spot the process, in this case "hello" in the long list of processes, put the cursor on it, and click the "End Process" box on the lower right.