Normally you compile against whatever wxWidgets version is packaged by the Linux OS.
On Windows, there are known wxWidgets 3.0 bugs in Code::Blocks.
On Linux, normally wxWidgets 3.0 is used; so, it is easier to confirm issues if you use wxWidgets 3.0.
On Mac OS, wxWidgets 3.1 is normally used because the versions before that have a lot of wxWidgets known bugs on Mac.
Tim S.