Do you have things like WXUSINGDLL or __GNUWIN32__ (or whatever is suitable for your project) defined? That is what made me fail the first time I tried building a wxWindows app with code::blocks.
I uninstalled and then re-installed, this time without adding wx 2.61. I created a new project (I've tried it using static wx and the using the wx dll, both resulting in the same problem). My project compiler definitions are (I removed __WIN95__):
WIN32
_WIN32
WINVER=0x0400
__GNUWIN32__
__WIN32__
STRICT
__WXMSW__
__WINDOWS__
WXUSINGDLL
I added the WX_VER=242 vcustom variable, and turned on "create debugging symbols".
I have the following in my includes directories:
C:\Program Files\CodeBlocks\include
When I compile, I get this:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\wxMedbase\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from main.h:4,
from main.cpp:1:
app.h:4:23: wx/wxprec.h: No such file or directory
app.h:11:23: wx/wx.h: No such file or directory
In file included from main.h:4,
from main.cpp:1:
app.h:15: error: expected class-name before '{' token
In file included from main.cpp:1:
main.h:7: error: expected class-name before '{' token
main.h:9: error: expected `)' before '*' token
main.h:12: error: `wxCommandEvent' has not been declared
main.h:12: error: ISO C++ forbids declaration of `event' with no type
main.h:13: error: `wxCommandEvent' has not been declared
main.h:13: error: ISO C++ forbids declaration of `event' with no type
main.h:14: error: ISO C++ forbids declaration of `DECLARE_EVENT_TABLE' with no type
main.cpp:3: error: `wxNewId' was not declared in this scope
main.cpp:4: error: `wxNewId' was not declared in this scope
main.cpp:6: error: `wxFrame' has not been declared
main.cpp:7: error: expected constructor, destructor, or type conversion before "EVT_MENU"
main.cpp:7: error: expected `,' or `;' before "EVT_MENU"
main.cpp:30: error: variable or field `OnQuit' declared void
main.cpp:30: error: `int MyFrame::OnQuit' is not a static member of `class MyFrame'
main.cpp:30: error: `wxCommandEvent' was not declared in this scope
main.cpp:30: error: `event' was not declared in this scope
main.cpp:31: error: expected `,' or `;' before '{' token
main.cpp:35: error: variable or field `OnAbout' declared void
main.cpp:35: error: `int MyFrame::OnAbout' is not a static member of `class MyFrame'
main.cpp:35: error: `wxCommandEvent' was not declared in this scope
main.cpp:35: error: `event' was not declared in this scope
main.cpp:36: error: expected `,' or `;' before '{' token
Process terminated with status 1 (0 minutes, 0 seconds)
25 errors, 0 warnings