title: OpenGL + Mesa 3D + MinGW
body: <p>I program C++ applications on (Ubuntu) Linux and compile them to 2 operating systems: natively to <em>Linux</em> by using "g++" (GNU C++ compiler) and cross-compile them to <em>Windows</em> by using "i386-mingw32-g++" (MinGW C++ cross-compiler).</p>
  
  <p>Now, I am trying to cross-compile "OpenGL" applications (from Linux to Windows) - for that I need some OpenGL library files.<br/>
  As an implementation of OpenGL, I use "Mesa 3D" open source library. Fortunately, Ubuntu offers "precompiled" mesa3d libraries (<em>libgl1-mesa-dev</em> and <em>libglu1-mesa-dev</em>) for Linux, but unfortunately, there are not any precompiled libraries for using with MinGW cross-compiler (thus Windows versions of them) - so I "MUST" manually compile them "from source" (which can be downloaded from <a href="http://www.mesa3d.org" rel="noreferrer">http://www.mesa3d.org</a> homepage).</p>
  
  <p>But I have no idea to do that. Within the mesa3d source code, there are some documents how to build the libraries for some specific platforms - specifically there is "README.MINGW32" readme file.<br/>
  But just on the first lines there is some command</p>
  
  <pre><code>mingw32-make -f Makefile.mgw [OPTIONS...]
  </code></pre>
  
  <p>which I cannot run because I don't have any "mingw32-make" program installed. By other softwares, I used to build them with the "classic"</p>
  
  <pre><code>./configure -&gt; make -&gt; make install
  </code></pre>
  
  <p>procedure, but this is not working on mesa3d libraries.<br/>
  For example, I have also tried</p>
  
  <pre><code>./configure --host=i386-mingw32
  </code></pre>
  
  <p>and it has been configured ok but after typing</p>
  
  <pre><code>make
  </code></pre>
  
  <p>it threw some error</p>
  
  <pre><code>error: #error No PIPE_SUBSYSTEM_WINDOWS_xxx subsystem defined.
  </code></pre>
  
  <p>and now I am LOST :-( .</p>
  
  <p>So does anybody know how to build the mesa3d libraries for using them with mingw32?</p>
  
  <p><em>P.S.:</em> And of course, <strong>I DON'T WANT</strong> to use Microsoft Visual Studio NEVER MORE :-) . And also I would like to do all the required things to build up OpenGL environment from Linux and using mingw32 for cross-compiling. I hope it is possible.</p>
  
  <p><em>P.S.2:</em> On <a href="http://www.mesa3d.org/systems.html" rel="noreferrer">http://www.mesa3d.org/systems.html</a> page there is written that using MinGW with Mesa 3D is "deprecated". I am on the right way to use it just that way?</p>