Describe BuildEnvMingw here.

Perhaps add a note to section "2.8. Setting up a Windows Build Environment with MinGW", that it will be ok to mix usage of MSYS binaries with Cygwin contrary to the following statement in Msys's "Readme.rtf".

Using binaries with different runtimes: You can't use Cygwin binaries at all and if you try you'll most likely just cause the processes to "hang". You can use Win32 native binaries but you should put them into the /mingw/bin or your /usr/local/bin directory tree. If you wish to replace an MSYS binary with a native win32 version then delete or rename the /bin version.


2.8. Setting up a Windows Build Environment with MinGW

On Windows, the recommended way to build VOS is using the MinGW/MSys toolchain, which are (mostly) Windows-native ports of traditional Unix tools, in particularly GNU autotools build system (autoconf/automake/libtool). Lucky for us, MinGW and MSys have been packaged up with installers to make them relatively easy to set up. However, the Msys toolchain does not quite provide everything we need. To get the remaining tools, we will also do a minimal Cygwin install and download the remaining necessary packages (bison, file, and pkg-config).

From http://mingw.org/download.shtml, download and install the following packages, in this order (substitute newer versions if available):

  1. MSYS-1.0.10.exe
  2. msysDTK-1.0.1.exe
  3. MinGW-3.1.0-1.exe

You will need a newer version of GCC than the version (3.2) installed with the .exe's above, so download and untar into "/mingw/" the following two packages (substitute newer versions if available):

  1. gcc-core-3.4.2-20040916-1.tar.gz

  2. gcc-g++-3.4.2-20040916-1.tar.gz

When this is complete, you should have an "MSYS" icon on your desktop, which when double-clicked will give you a bash shell. You should have gcc in your path (version 3.4 or better).

Next, go to http://www.cygwin.com and download setup.exe. Run this and follow the instructions. When it comes time to select packages to install, ensure that the following packages are selected:

  • "bison" in section "devel"

  • "pkgconfig" in section "devel"
  • "file" in section "utils"

Now sit back and let the Cygwin installer do its magic.

Once Cygwin is set up, open the MSYS bash shell and edit /etc/profile (C:\Msys\1.0\etc\profile) to add the following line to the bottom of the file:

export PATH=$PATH:/c/cygwin/bin

Now restart the MSYS shell. The commands pkg-config, file and bison should be available from at the MSYS prompt.

Finally, download vos-win32-mingw-libs-0.21.tar.gz . This contains headers and precompiled libraries for zlib, boost and wxWidgets, saving you the trouble of building them yourself.

'NOTE: Be aware that the printing to standard out code - std::cout << "VOS Tutorial 1\n\n"; - was only working for me when run from the Windows command prompt. No output when attempting to run from within the MSYS shell.'

--> Windows (or maybe it's rxvt) does output buffering differently. I've found it neccesary to force the output buffer flushed occasionally: fflush(stdout). (There is probably an object for doing that with the C++ iostreams too). -reed


Whilst MinGW still ships with the old and somewhat-broken version '2.5.4' of "flex", you will need run "fixFlexBug" script from the root of the VOS codebase, prior to starting to compile VOS.


CategoryDocumentation CategoryWorkInProgress

BuildEnvMingw (last edited 2007-03-31 05:00:49 by c-24-91-136-46)