Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting up wxWidgets in Code::Blocks?
    text
    copied!<p>I'm trying to make this code work but I can't. I'm hoping that it could run so I can use it in my other project. I just saw this on the web. It is about wxOGL.</p> <pre><code>#include &lt;wx/wx.h&gt; #include &lt;wx/ogl/ogl.h&gt; #include &lt;wx/cursor.h&gt; class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { wxDiagram * diagram; wxShape * shape; public: MyFrame(const wxString&amp; title, const wxPoint&amp; pos, const wxSize&amp; size); ~MyFrame(); }; IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame(_("wxWidgets - Object Graphics Library"), wxPoint(50, 50), wxSize(450, 340) ); frame-&gt;Show(TRUE); SetTopWindow(frame); return TRUE; } MyFrame::MyFrame(const wxString&amp; title, const wxPoint&amp; pos, const wxSize&amp; size) : wxFrame((wxFrame *)NULL, -1, title, pos, size) { wxShapeCanvas *canvas = new wxShapeCanvas(this, wxID_ANY, pos, size, 0, _T("a")); canvas-&gt;SetBackgroundColour(*wxWHITE); canvas-&gt;SetCursor(wxCursor(wxCURSOR_CROSS)); diagram = new wxDiagram(); canvas-&gt;SetDiagram(diagram); shape = new wxCircleShape(20.0); shape-&gt;SetX(25.0); shape-&gt;SetY(25.0); canvas-&gt;AddShape(shape); diagram-&gt;ShowAll(1); } MyFrame::~MyFrame() { delete shape; delete diagram; } </code></pre> <p>I don't know what it does, I just want to take a look at it. When I compile it in Code::Blocks, it keeps returning error saying "wx/wx.h: no such file directory" and other errors. Does anyone can fix this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload