I just installed codeblocks today and tryed to build a basic wxwidgets app.
first i built the wx librarys dinamicaly and tested them with some of the samples, and everything went fine...
but when i created a wx app using codeblocks at first i got tons of linker errors. these where quickly fixed by including the apropriate libs.
then there was a prob with unicode (some _() missing), quickly fixed too, but after fixing this, still there are the folowing warnings:
cl : Command line warning D4002 : ignoring unknown option '-pipe'
cl : Command line warning D4002 : ignoring unknown option '-mthreads'
cl : Command line warning D4002 : ignoring unknown option '-fno-pcc-struct-return'
cl : Command line warning D4002 : ignoring unknown option '-fno-rtti'
cl : Command line warning D4002 : ignoring unknown option '-fno-exceptions'
I have no idea where these come from...
but i ignored them for now and tried to run the app but just nothing happens.
the console says:
Project : wxWidgets application
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Dokumente und Einstellungen\Max\Eigene Dateien\Neuer Ordner (4)\
--------------------------------------------------------------------------------
Executing: "C:\Dokumente und Einstellungen\Max\Eigene Dateien\Neuer Ordner (4)\wxWidgets.exe" (in .)
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
but there's no window.
is there anything important i forgot?
btw this is the prog:
#ifndef __BASE_H
#define __BASE_H
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
class MainApp: public wxApp
{
public:
virtual bool OnInit();
};
class MainFrame: public wxFrame
{
public:
MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size);
void OnQuit(wxCommandEvent &event);
private:
DECLARE_EVENT_TABLE()
};
enum
{
ID_MAINWIN_QUIT = wxID_HIGHEST+1
};
#endif
IMPLEMENT_APP(MainApp)
bool MainApp::OnInit()
{
MainFrame *win = new MainFrame(_("Frame"), wxPoint (100, 100),
wxSize(450, 340));
win->Show(TRUE);
SetTopWindow(win);
return TRUE;
}
BEGIN_EVENT_TABLE(MainFrame, wxFrame)
EVT_MENU(ID_MAINWIN_QUIT, MainFrame::OnQuit)
END_EVENT_TABLE()
MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size)
: wxFrame((wxFrame *) NULL, -1, title, pos, size)
{
wxMenu *FileMenu = new wxMenu;
wxMenuBar *MenuBar = new wxMenuBar;
FileMenu->Append(ID_MAINWIN_QUIT, _("&Quit"));
MenuBar->Append(FileMenu, _("&File"));
SetMenuBar(MenuBar);
CreateStatusBar(2);
SetStatusText(_("Hello World!"));
}
void MainFrame::OnQuit(wxCommandEvent & WXUNUSED(event))
{
Close(TRUE);
}