<p>I installed the wxWidgets source code, compiled it and am linking the libraries thus obtained with my application code. Now I need to use OpenGL in my wxWidgets application. How do I enable this?</p>

[{'answer_id': 14141, 'author': 'Ashwin Nanjappa', 'author_id': 1630, 'author_profile': 'https://Stackoverflow.com/users/1630', 'pm_score': -1, 'selected': False, 'text': '<p>(Assume $(WX_WIDGETS_ROOT) is the root directory of your wxWidgets installation.)</p>\n\n<ol>\n<li>Open the file $(WX_WIDGETS_ROOT)\\include\\wx\\msw\\setup.h</li>\n<li>Search and find the option wxUSE_GLCANVAS. Change its value from 0 to 1.</li>\n<li>Recompile the library.</li>\n</ol>\n'}, {'answer_id': 35975, 'author': 'Jason Weathered', 'author_id': 3736, 'author_profile': 'https://Stackoverflow.com/users/3736', 'pm_score': 2, 'selected': False, 'text': "<p>If you're using <code>configure</code> to build wxWidgets you just need to add <code>--with-opengl</code> to your command line.</p>\n"}, {'answer_id': 72787, 'author': 'Baxissimo', 'author_id': 9631, 'author_profile': 'https://Stackoverflow.com/users/9631', 'pm_score': 4, 'selected': True, 'text': '<h2>For building on Windows with project files:</h2>\n\n<p>Assume $(WXWIDGETSROOT) is the root directory of your wxWidgets installation.</p>\n\n<ol>\n<li>Open the file $(WXWIDGETSROOT)\\include\\wx\\msw\\setup.h</li>\n<li>Search for the <code>#define</code> for <code>wxUSE_GLCANVAS</code>. </li>\n<li>Change its value from 0 to 1.</li>\n<li>Recompile the library.</li>\n</ol>\n\n<h2>For building on Linux and other <code>./configure</code> based platforms:</h2>\n\n<p>Just use <code>./configure --with-opengl</code></p>\n\n<p>(A mashup answer from two partial answers given by others)</p>\n'}, {'answer_id': 24235871, 'author': 'demented hedgehog', 'author_id': 871196, 'author_profile': 'https://Stackoverflow.com/users/871196', 'pm_score': 1, 'selected': False, 'text': "<p>Just to add a little bit...  If you're on linux you need to watch the logs when running configure.  If it can't find opengl dev packages then it will turn opengl off with one line of warning which is easy to miss.</p>\n\n<p>run it like this to make it more obvious what development libraries you're actually missing (it looks like the --with-opengl is on by default in 3.0.0 and possibly earlier versions of wxwidgets, but it can't hurt to include it I suspect). </p>\n\n<pre><code>./configure --with-opengl &gt; configure.log\n</code></pre>\n\n<p>Once configure can find all the dev libs you think you're going to use you need to rebuild wxwidgets:</p>\n\n<pre><code>make\nsudo make install \n</code></pre>\n\n<p>I had to install these on linux mint to make wxwidget's configure happy as far as opengl was concerned (and should also work for ubuntu) to get the dev libs I needed.</p>\n\n<pre><code>sudo apt-get install mesa-common-dev\nsudo apt-get install freeglut3-dev\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/14138', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1630/']