Compile Rocrail with MinGW, MSYS and wxWidgets

Developer corner


  1. * is used to indicate a number in the version indication of packages mentioned below. When you need te enter a command replace the * by the number of the actual package you installed.
  2. From revision 1187 ansi (for windows 95/98) compilation is no longer supported.

Install MinGw:

Download from the latest mingw*.exe setup:

Start the setup after it has been downloaded.

Select following options:

  • gcc
  • c++
  • base msys

Install it as proposed in c:\mingw.

Set the start of the user PATH environment variable to: “C:\mingw\bin;…” (The three dots represents the rest of the variable value.)

rename the mingw32-make.exe into make.exe

On Vista you will get the error gcc: installation problem, cannot exec `cc1' while trying to compile Rocrail with MinGW version 5.1.*.
The configure of wxwidgets fails too. It seems that the only workaround is to copy the files in C:\MinGW\libexec\gcc\mingw32\3.4.* to C:\MinGW\bin.

Get the sources:

checkout the sources with a bzr client from into C:\lp\Rocrail

C:\>cd lp
C:\lp>bzr checkout --lightweight Rocrail

A good SVN Client can be found at Go to the download section and download the svn-win32-1.*.*.zip Unzip the file in your prefered directory and add the C:\…..\bin path to the global path variable in your system enviroment. After this is done remember to reboot the machine.

Build the project:

Open a command shell and change directory to C:\lp\Rocrail and execute make:

C:\>cd C:\lp\Rocrail
C:\lp\Rocrail>make PLATFORM=WIN32 NATIVE=WIN32 MINGWINSTALL=C:\wxWidgets-2.8.*
:!: Replace the wild card, *, with the patch part of the wxWidgets version. Example: MINGWINSTALL=C:\wxWidgets-2.8.11

Except for the Rocview you must be able to build the Rocrail server and the controller libraries.

Install MSys:

Get from the latest MSYS-1.0.10.exe setup and install it as proposed, and answer yes to all questions and tell it where you installed mingw. ( If all went OK you have an MSYS shortcut on the desktop you will need later on. (The make file is named back again to mingw32-make.exe but msys has its own make.)

Install wxWidgets:


From source

Build the wxWidgets libraries:

Now double click on the MSYS shortcut to open a unix like shell and try this:

cd c:
cd wxWidgets-2.8.*
mkdir mingw
cd mingw
../configure --disable-shared --enable-unicode --enable-mslu --enable-graphics_ctx 
make BUILD=release

Trouble shooting

The system cannot find the path specified.

Use /usr/bin/make if following error appears:

# make (e=3): The system cannot find the path specified.

No such file or directory: '/dev/null'

IOError: [Errno 2] No such file or directory: '/dev/null'

Just create the directory and reinvoke make or /usr/bin/make.

$ mkdir /dev/null
$ /usr/bin/make

The configure will take some time to finish depending on your hardware. But the make will take longer than you can imagine to finish.;-) … But after a very long time the libraries are build:

C:\wxWidgets-2.8.4\mingw>dir lib
06.09.2007  22:12           158.846 libwxexpat-2.8.a
06.09.2007  22:08           147.328 libwxjpeg-2.8.a
06.09.2007  22:06           169.646 libwxpng-2.8.a
06.09.2007  22:04           101.362 libwxregexu-2.8.a
06.09.2007  22:11           327.360 libwxtiff-2.8.a
06.09.2007  22:05            72.716 libwxzlib-2.8.a
06.09.2007  22:31         2.083.884 libwx_baseu-2.8.a
06.09.2007  22:34           311.274 libwx_baseu_net-2.8.a
07.09.2007  00:18            46.142 libwx_baseu_xml-2.8.a
07.09.2007  00:05         1.636.616 libwx_mswu_adv-2.8.a
07.09.2007  00:40           567.984 libwx_mswu_aui-2.8.a
06.09.2007  23:54         9.032.418 libwx_mswu_core-2.8.a
07.09.2007  00:16         1.317.914 libwx_mswu_html-2.8.a
07.09.2007  00:17           184.232 libwx_mswu_qa-2.8.a
07.09.2007  00:54         1.903.786 libwx_mswu_richtext-2.8.a
07.09.2007  00:37         1.644.622 libwx_mswu_xrc-2.8.a

Move or copy the library from C:\wxWidgets-2.8.*\mingw\lib to C:\wxWidgets-2.8.*\lib-unicode.
Work your way down the directory tree you just moved or copied until you find a directory named wx, containing the file C:\wxWidgets-2.8.*\lib-unicode\wx\include\msw-unicode-release-static-2.8\wx\setup.h. Copy this file to the wxWidgets-2.8.*\include\wx directory.
Now it is time to try to build the Rocview.exe.

Building the Rocview:

C:\lp\Rocrail\rocview>make PLATFORM=WIN32 NATIVE=WIN32 MINGWINSTALL=c:\wxWidgets-2.8.* wxversion=2.8
:!: Replace the wild card, *, with the patch part of the wxWidgets version. Example: MINGWINSTALL=C:\wxWidgets-2.8.11

After the rocview.exe is created you can give it a try:

Personal Tools