<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Just something interesting I learnt today...</div><div><br></div><div># Background</div><div><br></div><div>In <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/scripts/installCygwin.bat">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/scripts/installCygwin.bat</a> </div><div>I noticed mingw packages being installed. </div><div dir="ltr"><br></div><div dir="ltr">so I wanted to refresh myself on the difference between Cygwin and Ming.</div><div>Beside confirming my existing understanding that Mingw links against Microsoft libraries </div><div>while Cygwin links against its own Posix library, I learnt a new and finer distinction that...</div><div>    Mingw is a cross compiler that runs in the Cygwin environment.</div><div><br></div><div><div>That made me wonder about mingw cross compiling from other environments.  I found this article indicating it was possible...</div></div><div dir="ltr"><div><a href="http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/">http://www.blogcompiler.com/2010/07/11/compile-for-windows-on-linux/</a><br></div><div><br></div><div># Testing<br></div><div><br></div><div>I got it working first with Windows 10 Subsystem For Linux </div><div>and then with Travis using this repo... <a href="https://github.com/bencoman/travis-mingw-test">https://github.com/bencoman/travis-mingw-test</a></div><div>The build logs are viewable here...  <a href="https://travis-ci.org/bencoman/travis-mingw-test/builds">https://travis-ci.org/bencoman/travis-mingw-test/builds</a><br class="gmail-Apple-interchange-newline"></div><div><div>and build products downloadable here... <a href="https://github.com/bencoman/travis-mingw-test/releases/latest">https://github.com/bencoman/travis-mingw-test/releases/latest</a>  </div></div></div><div>Try running them on Windows.</div><div dir="ltr"><br class="gmail-Apple-interchange-newline"><div>You can try it out locally on Windows 10 WSL by doing...<br></div><div><div>    $ sudo apt-get install mingw-w64</div><div>    $ git clone <a href="https://github.com/bencoman/travis-mingw-test.git">https://github.com/bencoman/travis-mingw-test.git</a></div>    $ cd travis-mingw-test</div><div>    $ ./build.sh</div><div>then in a Windows shell...</div><div>    cd C:\tmp\hello</div><div>    hello-w32.exe</div><div>        Hello World!   </div><div><br></div><div>At the start of today I had no clue Travis could do something like that<br></div><div>and it feels super cool to have done it!  ...so just had to share.</div><div>cheers -ben<br></div><div><br></div><div><br></div><div>P.S. My WSL platform is...</div><div>$ uname -a <br></div><div><div>Linux BENGINEER 4.4.0-17134-Microsoft #471-Microsoft Fri Dec 07 20:04:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux</div><div><br></div><div>$ cat /etc/lsb-release</div><div>DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"<br></div></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>