You need to add to your CXXFLAGS the following: `wx-config --cxxflags` (note that those are backticks, not single quotes.) Also, add to LDFLAGS `wx-config --libs` (once again, backticks). See Wx-Config for more details.
In KDevelop 2.1 it seems you can set these by going to the Project menu, Options, Compiler Options. Once there, the CXXFLAGS are in "Flags and Warnings", and the LDFLAGS are in "Linker Flags".