User forums > Using Code::Blocks

Compile a hello world project

(1/4) > >>

cotede2:
Hello, I am a newbie using codeblocks (with the compiler integrated).
I'd like to build and run an easy program.
Here how I proceed:

File -> New -> wxWidget Project.

Preferred GUI Builder :  None
Application Type : Frame Based
wxwidgets : C:\wxWidgets-2.8.10
Compiler : GNU GCC Compiler
Create "Debug" configuration
Create "Release" configuration

Then I have two warnings windows "a matching debug configuration cannot be found in the wxwidget directory you specified"
"a matching release configuration cannot be found in the wxwidget directory you specified"
Then when I do Build .
Nothing appears.
I think I lost the log window and I cannot get it back.
How can I do that?

Please help

Here is my code:

--- Code: ---#include "NewPanel.h"

//(*InternalHeaders(NewPanel)
#include <wx/intl.h>
#include <wx/string.h>
//*)

//(*IdInit(NewPanel)
const long NewPanel::ID_BUTTON1 = wxNewId();
//*)

BEGIN_EVENT_TABLE(NewPanel,wxPanel)
//(*EventTable(NewPanel)
//*)
END_EVENT_TABLE()

NewPanel::NewPanel(wxWindow* parent,wxWindowID id)
{
//(*Initialize(NewPanel)
Create(parent, id, wxDefaultPosition, wxSize(949,283), wxTAB_TRAVERSAL, _T("id"));
Button1 = new wxButton(this, ID_BUTTON1, _("Label"), wxPoint(144,48), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
//*)
}

NewPanel::~NewPanel()
{
//(*Destroy(NewPanel)
//*)
}


void NewPanel::OnButton1Click(wxCommandEvent& event)
{
}

--- End code ---

Jenna:
It looks like you are missing wxWidgets.
You have to download the sources and build it yourself or use the devpak-version.

How to install wxWdgets and set up C::B for use with it see this wiki-article: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

cotede2:
I had installed wxwidget 2.8.10 ... only binaries, is that enough?

kencamargo:

--- Quote from: cotede2 on April 24, 2010, 05:49:05 pm ---I had installed wxwidget 2.8.10 ... only binaries, is that enough?

--- End quote ---

You have to have the debug and release versions of the libraries, and you have to tell codeblocks where they are. The easiest way to do this is to set the wx environment variable to point to the directory you had it installed. And you have to have the headers as well.

HTH,
Ken

cotede2:
thank you but I really cannot find the debug and release version !
When I download the wxAll from here
http://www.wxwidgets.org/downloads/

I don't have any debug nor release folder into the archive so when I create a new project I cannot specify Debug nor Release...
I am so lost.

Navigation

[0] Message Index

[#] Next page

Go to full version