I read somewhere to add 'wx-config --cflags' and 'wx-config --libs' to solve this problem:
-------------- Build: Release in wxtest ---------------
g++ -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -Wall -O2 -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -c /home/mark/Documents/CB/wxtest/wxtestApp.cpp -o obj/Release/wxtestApp.o
In file included from /home/mark/Documents/CB/wxtest/wxtestApp.cpp:10:
/home/mark/Documents/CB/wxtest/wxtestApp.h:13:20: error: wx/app.h: No such file or directory
In file included from /home/mark/Documents/CB/wxtest/wxtestApp.cpp:13:
/home/mark/Documents/CB/wxtest/wxtestMain.h:14:22: error: wx/sizer.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:15:25: error: wx/stattext.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:16:25: error: wx/statline.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:17:23: error: wx/button.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestMain.h:18:23: error: wx/dialog.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:14:22: error: wx/image.h: No such file or directory
/home/mark/Documents/CB/wxtest/wxtestApp.h:16: error: expected class-name before ‘{’ token
/home/mark/Documents/CB/wxtest/wxtestApp.h:16: warning: ‘class wxtestApp’ has virtual functions but non-virtual destructor
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: error: expected class-name before ‘{’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:25: error: expected `)' before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:31: error: ‘wxCommandEvent’ has not been declared
/home/mark/Documents/CB/wxtest/wxtestMain.h:32: error: ‘wxCommandEvent’ has not been declared
/home/mark/Documents/CB/wxtest/wxtestMain.h:43: error: ISO C++ forbids declaration of ‘wxButton’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:43: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:44: error: ISO C++ forbids declaration of ‘wxStaticText’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:44: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:45: error: ISO C++ forbids declaration of ‘wxBoxSizer’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:45: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:46: error: ISO C++ forbids declaration of ‘wxButton’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:46: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:47: error: ISO C++ forbids declaration of ‘wxStaticLine’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:47: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:48: error: ISO C++ forbids declaration of ‘wxBoxSizer’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:48: error: expected ‘;’ before ‘*’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:51: error: ISO C++ forbids declaration of ‘DECLARE_EVENT_TABLE’ with no type
/home/mark/Documents/CB/wxtest/wxtestMain.h:52: error: expected ‘;’ before ‘}’ token
/home/mark/Documents/CB/wxtest/wxtestMain.h:52: error: expected `;' before ‘}’ token
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:17: error: expected constructor, destructor, or type conversion before ‘;’ token
/home/mark/Documents/CB/wxtest/wxtestApp.cpp: In member function ‘virtual bool wxtestApp::OnInit()’:
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:23: error: ‘wxInitAllImageHandlers’ was not declared in this scope
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:26: error: no matching function for call to ‘wxtestDialog::wxtestDialog(int)’
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: note: candidates are: wxtestDialog::wxtestDialog()
/home/mark/Documents/CB/wxtest/wxtestMain.h:22: note: wxtestDialog::wxtestDialog(const wxtestDialog&)
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:27: error: ‘SetTopWindow’ was not declared in this scope
/home/mark/Documents/CB/wxtest/wxtestApp.cpp:28: error: ‘class wxtestDialog’ has no member named ‘ShowModal’
Process terminated with status 1 (0 minutes, 0 seconds)
32 errors, 1 warnings