Here is the prototype for the wxStaticText constructor:
wxStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "staticText")
Your code, therefore, is both skipping the label parameter and, apparently, trying to pass a const pointer as the (non-const) parent parameter. (Maybe you're within a const member function?)
That aside, the Code::Blocks forums are for posting about issues specifically related to Code::Blocks, and unless the code in question is being automatically generated by wxSmith, this issue is specifically related to wxWidgets, not C::B.