Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Alright, I finally managed to get it working :)</p> <p>I'm posting here the procedure to follow if, like me, someone wanted to use wxWidgets in an (initially) console project under Code::Blocks. With this, anyone should be able to build/run at least <a href="http://www.wxwidgets.org/docs/tutorials/hworld2.txt" rel="nofollow noreferrer">this sample code</a> in a Wind0ws environment:</p> <ol> <li>I'll assume that Code::Blocks and MinGW are correctly setup.</li> <li>Download/Install wxMSW from <a href="http://www.wxwidgets.org/downloads/" rel="nofollow noreferrer">http://www.wxwidgets.org/downloads/</a> (in my case, I downloaded wxMSW-2.8.12-Setup.exe and installed it in C:\libraries\wxWidgets-2.8.12)</li> <li><p>Open a command prompt, wxWidgets needs to be built, I'll take the exemple of a statically-linked, monolithic, debug build that uses unicode (more infos <a href="http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef" rel="nofollow noreferrer">here</a>):</p> <blockquote> <p>cd /D C:\libraries\wxWidgets-2.8.12\build\msw</p> <p>mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1</p> <p>:(mingw32-make will take some time to build the library)</p> </blockquote></li> <li><p>Open Code::Blocks</p></li> <li>Create a new <strong>console project</strong>, or if you already have a console project (and you plan to add a wxWidgets GUI to it) open it</li> <li>Right-click on the project > Build options</li> <li><a href="http://s23.postimage.org/4mjjohbaj/solution.png" rel="nofollow noreferrer">Here are the build options</a> that I used for the Debug build. <img src="https://i.stack.imgur.com/stdhN.png" alt="Code::Blocks build options for wxWidgets"></li> <li>Build &amp; Run</li> </ol> <p>[EDIT] wx/app.h should be included in addition to wx/wx.h</p> <pre><code>#include &lt;wx/wx.h&gt; #include &lt;wx/app.h&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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