I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
[...]
Such messages appear for example if the
setup.h file (normally found in
include/wx/msw) which you include is not compatible with your wxWidgets build or is missing alltogether.
How could it be missing, the compiler would throw an error, you ask? No, you do not necessarily get an error message, since there is usually another
setup.h (completely unrelated) in your include dirs, and the compiler will use that one if it does not find the correct one.
Make sure that the include paths are properly set up. The easiest and most foolproof way is to do it as we do in the Code::Blocks build and which is assumed for the templates too: keep wxWidgets in one place (don't copy headers to
D:/CodeBlocks/include/ like you did). Unzip it to some arbitrary location. Configure it there, compile it there, leave it there. Don't touch anything afterwards.
Then make a variable or global user variable (if you're using a recent build) pointing to the wx directory, and add
$YOURVARIABLE/lib/gcc_dll/msw and
$YOURVARIABLE/include to the top of compiler includes. If you use several builds (unicode / non-unicode, for example), you can use a second variable to distinguish builds, too.
That way, everything works, it is foolproof, and you can switch versions painlessly.
Please post the full command line log (to be enabled int he compiler settings) so we can help you.
Yes, that, and the version.
Whenever reporting
any kind of problem, please
always provide the exact program revision and the full build commandline. The best thing to do (if you have a recent build) is to click on the revision string in the "start here" page. That copies the revision information to the clipboard. Paste it as the first line of your post.