Re: Compiling a C++/Wx program

  • From: "jaffar" <jaffar@xxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 28 Nov 2007 09:02:26 +0800

Hi Jamal. The digital mars and watcom compilers are no longer officially supported. Also, These need a little tweaking of library and header files to make them work. I'll write up a tutorial for those when time permits. Cheers! ----- Original Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx>

To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, November 28, 2007 8:59 AM
Subject: Re: Compiling a C++/Wx program


Thanks for any help you can provide.  I'm eager to get this working so
will keep trying in the meantime., e.g., by editing one of the make files
for the Wx sample programs (I have tried this without success, but will
try again).  Ideally, I would like to compare the executables produced by
various free C++ compilers, including VC++ Express, MinGW, and Borland.
I have read that Digital Mars and WattCom (spelling?) are two others.
Does anyone know how they compare?

Jamal
On Wed, 28 Nov 2007, jaffar wrote:

Date: Wed, 28 Nov 2007 08:37:05 +0800
From: jaffar <jaffar@xxxxxxxxxxxxx>
Reply-To: programmingblind@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Compiling a C++/Wx program

Hi Jamal.  Give me a a day or 2.  Cheers!
----- Original Message -----
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, November 28, 2007 6:47 AM
Subject: Compiling a C++/Wx program


> Jaffar's tutorial helped me build the Wx libraries with Microsoft > Visual > C++ 2005 Express. I initially chose the ANSI and release options. I > now
> have a fruit basket program that compiles but fails to link (many
> unresolved symbols). Can anyone help me write a batch file or make > file
> that builds an executable out of the code below?
>
> Jamal
> #include "wx/wx.h"
>
> class FruitBasket : public wxApp {
> public:
> wxDialog *dlg;
> wxListBox *lstBasket;
> wxTextCtrl *txtFruit;
> wxButton *btnAdd, *btnDelete;
>
> bool OnInit() {
> dlg = new wxDialog(NULL, wxID_ANY, "Fruit Basket", wxDefaultPosition,
> wxSize(513, 176));
> new wxStaticText(dlg, wxID_ANY, "&Fruit:", wxPoint(14, 14),
> wxDefaultSize);
> txtFruit = new wxTextCtrl(dlg, wxID_ANY, "", wxPoint(43, 14),
> wxDefaultSize, wxTE_LEFT);
>
> new wxStaticText(dlg, wxID_ANY, "&Basket:", wxPoint(251, 14),
> wxDefaultSize);
> lstBasket = new wxListBox(dlg, wxID_ANY, wxPoint(293,14), > wxDefaultSize,
> 0);
>
> btnAdd = new wxButton(dlg, wxID_ANY, "&Add", wxPoint(190, 121),
> wxDefaultSize);
> btnAdd->SetDefault();
> dlg->Connect(btnAdd->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
> wxCommandEventHandler(FruitBasket::OnAdd));
>
> btnDelete = new wxButton(dlg, wxID_ANY, "&Delete", wxPoint(217, 121),
> wxDefaultSize);
> dlg->Connect(btnDelete->GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
> wxCommandEventHandler(FruitBasket::OnDelete));
>
> dlg->Connect(wxEVT_CLOSE_WINDOW,
> wxCommandEventHandler(FruitBasket::OnClose));
> dlg->Centre();
> dlg->Show(true);
> return true;
> } // OnInit
>
> void OnAdd(wxCommandEvent& event) {
> wxString sValue = txtFruit->GetValue();
> if (sValue == "") {
> wxMessageBox("No fruit to add!", "Alert", wxICON_EXCLAMATION, dlg);
> }
> else {
> lstBasket->Append(sValue);
> txtFruit->Clear();
> int iFruit = lstBasket->GetCount() - 1;
> lstBasket->SetSelection(iFruit);
> }
> } // OnAdd
>
> void OnDelete(wxCommandEvent& event) {
> int iFruit = lstBasket->GetSelection();
> if (iFruit == -1) {
> wxMessageBox("No fruit to delete!", "Alert", wxICON_EXCLAMATION, dlg);
> }
> else {
> lstBasket->Delete(iFruit);
> if (iFruit == lstBasket->GetCount()) {iFruit--;}
> lstBasket->SetSelection(iFruit);
> }
> } // OnDelete
>
> void OnClose(wxCommandEvent& event) {
> if (wxMessageBox("Exit program?", "Confirm", wxYES_NO, dlg) == wxYES)
> {dlg->Destroy();}
> } // OnClose
> };
>
> IMPLEMENT_APP(FruitBasket)
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: