<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.swarm.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Railsback</id>
		<title>Swarm - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.swarm.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Railsback"/>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/wiki/Special:Contributions/Railsback"/>
		<updated>2026-07-01T14:10:44Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.0</generator>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2214</id>
		<title>Swarm and MinGW</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2214"/>
				<updated>2017-11-16T18:06:29Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: /* MinGW */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:&lt;br /&gt;
&lt;br /&gt;
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?&lt;br /&gt;
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.&lt;br /&gt;
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.&lt;br /&gt;
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.&lt;br /&gt;
&lt;br /&gt;
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.&lt;br /&gt;
&lt;br /&gt;
= Using Swarm Models Compiled with MinGW =&lt;br /&gt;
&lt;br /&gt;
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]&lt;br /&gt;
&lt;br /&gt;
However, running a Swarm model requires some support programs and libraries. These are available as&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-win32.zip&amp;lt;/tt&amp;gt;, available here:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]&lt;br /&gt;
&lt;br /&gt;
Unzipping that file will create a folder called &amp;lt;tt&amp;gt;swarm&amp;lt;/tt&amp;gt; which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before a Swarm model can be run, the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder must be added to the Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; so that Heatbugs can find necessary libraries when it runs. The &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;path=%PATH%;C:\swarm\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can alternatively add the Swarm folder to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; to the PATH system variable.&lt;br /&gt;
&lt;br /&gt;
Once the path has been set to include the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.  &lt;br /&gt;
&lt;br /&gt;
The Heatbugs model can now be run by changing the directory of the command line to the folder holding &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; and then executing the program. For example, if &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is located in &amp;lt;tt&amp;gt;C:\Users\example_user\Downloads&amp;lt;/tt&amp;gt;, then the model may be run as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd C:\Users\example_user\Downloads&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(or you can just double-click on &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)&lt;br /&gt;
&lt;br /&gt;
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]&lt;br /&gt;
&lt;br /&gt;
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; in the same directory where &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is, containing these lines: &lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, just double-clicking on &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; will start the model.&lt;br /&gt;
&lt;br /&gt;
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.&lt;br /&gt;
&lt;br /&gt;
= Installing Swarm and MinGW to compile models =&lt;br /&gt;
&lt;br /&gt;
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.&lt;br /&gt;
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
&lt;br /&gt;
The archived Swarm binaries '''MUST''' be placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt; to successfully compile Swarm models. This is because some paths had to be hard-coded by &amp;lt;tt&amp;gt;libtool&amp;lt;/tt&amp;gt; during the creation of the binaries.&lt;br /&gt;
&lt;br /&gt;
The final step before you can compile a Swarm model is to set the &amp;lt;tt&amp;gt;SWARMHOME&amp;lt;/tt&amp;gt; environment variable so that the &amp;amp;quot;make&amp;amp;quot; program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.&lt;br /&gt;
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: &amp;lt;pre&amp;gt;export SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*You can edit your Makefile so it starts with: &amp;lt;pre&amp;gt;SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add a new (User or System) variable called SWARMHOME with the value &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command &amp;amp;quot;Make&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An archive of official Swarm example programs can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]&lt;br /&gt;
&lt;br /&gt;
We will use the &amp;amp;quot;Heatbugs&amp;amp;quot; model as an example of how to compile a Swarm application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz&lt;br /&gt;
cd swarmapps-2.3.0/objc/heatbugs&lt;br /&gt;
&lt;br /&gt;
make&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''VERY IMPORTANT NOTE: MinGW produces two executables called &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt;---one in the &amp;lt;tt&amp;gt;heatbugs&amp;lt;/tt&amp;gt; folder and another in the &amp;lt;tt&amp;gt;heatbugs/.libs&amp;lt;/tt&amp;gt; folder. You should ignore the executable in the top-level folder, &amp;lt;tt&amp;gt;heatbugs/heatbugs.exe&amp;lt;/tt&amp;gt;, as it is merely a compiled wrapper script that executes &amp;lt;tt&amp;gt;heatbugs/.libs/heatbugs.exe&amp;lt;/tt&amp;gt;. When distributing compiled models, only use binaries from the &amp;lt;tt&amp;gt;.libs&amp;lt;/tt&amp;gt; folder.'''&lt;br /&gt;
&lt;br /&gt;
The resulting executable, &amp;lt;tt&amp;gt;.libs/heatbugs.exe&amp;lt;/tt&amp;gt; may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include &amp;lt;tt&amp;gt;C:\swarm\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Distributing a Swarm Model for Windows Users =&lt;br /&gt;
&lt;br /&gt;
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.&lt;br /&gt;
&lt;br /&gt;
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.&lt;br /&gt;
* Create another subdirectory that includes just the compiled model.&lt;br /&gt;
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model. &lt;br /&gt;
* Zip the whole tree up for distribution.&lt;br /&gt;
&lt;br /&gt;
The directory tree in the zip file looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\MySwarmModel\swarm&lt;br /&gt;
                      \bin&lt;br /&gt;
                      \etc&lt;br /&gt;
                      \include&lt;br /&gt;
                      \lib&lt;br /&gt;
                      \man&lt;br /&gt;
                      \share&lt;br /&gt;
               \executable\MySwarmModel.exe&lt;br /&gt;
               \Runfiles\MySwarmModel.bat (and any input files)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the file &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt; contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set SWARMHOME=C:\MySwarmModel\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
C:\MySwarmModel\executable\MySwarmModel.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then users can run the model just by double-clicking on &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Building Swarm Using MinGW =&lt;br /&gt;
&lt;br /&gt;
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.&lt;br /&gt;
&lt;br /&gt;
== Install Required Tools ==&lt;br /&gt;
&lt;br /&gt;
The first step is to download and install tools required for compiling Swarm. These links provide directions:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|MinGW]]&lt;br /&gt;
* [[#Emacs|Emacs]]&lt;br /&gt;
* [[#GPerf|GPerf]]&lt;br /&gt;
&lt;br /&gt;
== Build Support Libraries ==&lt;br /&gt;
&lt;br /&gt;
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]&lt;br /&gt;
&lt;br /&gt;
This archive contains two subdirectories:&lt;br /&gt;
&lt;br /&gt;
* sources: This folder contains the source code for each component.&lt;br /&gt;
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.&lt;br /&gt;
&lt;br /&gt;
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
mkdir build&amp;lt;/pre&amp;gt;&lt;br /&gt;
The following steps will all assume your MinGW shell is operating out of the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory. All compiled software will be installed to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt; (The Windows Explorer will see the folder appear at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== ZLib ===&lt;br /&gt;
&lt;br /&gt;
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following to build Zlib:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/zlib-1.2.5.tar.gz&lt;br /&gt;
cd zlib-1.2.5&lt;br /&gt;
make -f win32/Makefile.gcc&amp;lt;/pre&amp;gt;&lt;br /&gt;
And then the following commands to install ZLib to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir -p /c/swarm/bin&lt;br /&gt;
mkdir -p /c/swarm/include&lt;br /&gt;
mkdir -p /c/swarm/lib&lt;br /&gt;
&lt;br /&gt;
cp zlib1.dll /c/swarm/bin/&lt;br /&gt;
cp zconf.h zlib.h /c/swarm/include/&lt;br /&gt;
mv libzdll.a libz.dll.a&lt;br /&gt;
cp *.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LibPNG ===&lt;br /&gt;
&lt;br /&gt;
LibPNG will be built next as its only dependency is ZLib. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following steps to build and install LibPNG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/libpng-1.5.4.tar.bz2&lt;br /&gt;
cd libpng-1.5.4&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XPM ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, the XPM library can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/xpm-nox-4.2.0.tar.bz2&lt;br /&gt;
cd xpm-nox-4.2.0&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch&lt;br /&gt;
&lt;br /&gt;
make CC=gcc&lt;br /&gt;
make install prefix=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.&lt;br /&gt;
&lt;br /&gt;
One major modification has been made to the SUSE patchfile---&amp;lt;tt&amp;gt;tcl.h&amp;lt;/tt&amp;gt; is included in &amp;lt;tt&amp;gt;xpm.h&amp;lt;/tt&amp;gt;. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.&lt;br /&gt;
&lt;br /&gt;
=== LibFFI ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, LibFFI can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/libffi-3.0.9.tar.gz&lt;br /&gt;
cd libffi-3.0.9&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
The LibFFI headers get installed in a weird place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include&lt;br /&gt;
rm -rf /c/swarm/lib/libffi-3.0.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tcl can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tcl8.4.19-src.tar.gz&lt;br /&gt;
cd tcl8.4.19&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/tcl-8.4.19-fix-lvalues.patch&lt;br /&gt;
cd win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.&lt;br /&gt;
&lt;br /&gt;
=== Tk ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tk can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tk8.4.19-src.tar.gz&lt;br /&gt;
cd tk8.4.19/win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BLT ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, BLT can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/BLT2.4z.tar.gz&lt;br /&gt;
cd blt2.4z&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm --without-x&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HDF5 (Optional) ===&lt;br /&gt;
&lt;br /&gt;
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing &amp;lt;tt&amp;gt;.hdf&amp;lt;/tt&amp;gt; files is not needed this section can be skipped.&lt;br /&gt;
&lt;br /&gt;
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called &amp;lt;tt&amp;gt;pexports&amp;lt;/tt&amp;gt;. This can be installed using &amp;lt;tt&amp;gt;mingw-get&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mingw-utils&amp;lt;/pre&amp;gt;&lt;br /&gt;
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &amp;amp;quot;VS&amp;amp;quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd path/to/where/HDF5/was/extracted&lt;br /&gt;
&lt;br /&gt;
for dll in `ls dll/*dll`; do&lt;br /&gt;
  def_file=`basename $dll .dll`.def&lt;br /&gt;
  lib_file=lib`basename $dll dll.dll`.a&lt;br /&gt;
  pexports $dll &amp;amp;gt; $def_file&lt;br /&gt;
  dlltool -d $def_file -l lib/$lib_file&lt;br /&gt;
done&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next, move the libraries and header files needed to use HDF5 from C into &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin&lt;br /&gt;
cp include/* /c/swarm/include&lt;br /&gt;
cp lib/libhdf5.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, a patch must be applied to the HDF header file &amp;lt;tt&amp;gt;H5public.h&amp;lt;/tt&amp;gt; so that it doesn't define &amp;lt;tt&amp;gt;ssize_t&amp;lt;/tt&amp;gt;---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
patch -p1 -d /c/swarm &amp;amp;lt; patches/hdf5-1.8.7-mingw.patch&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Swarm ==&lt;br /&gt;
&lt;br /&gt;
Finally, the Swarm libraries themselves can be built. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/swarm-2.4.1.tar.gz&lt;br /&gt;
cd swarm-2.4.1&lt;br /&gt;
patch -p1 ../../patches/swarm-2.4.1-mingw.patch&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm \&lt;br /&gt;
  --with-zlibdir=/c/swarm \&lt;br /&gt;
  --with-pngdir=/c/swarm \&lt;br /&gt;
  --with-xpmdir=/c/swarm \&lt;br /&gt;
  --with-ffidir=/c/swarm \&lt;br /&gt;
  --with-tcl=/c/swarm/lib \&lt;br /&gt;
  --with-tk=/c/swarm/lib \&lt;br /&gt;
  --with-bltdir=/c/swarm&lt;br /&gt;
&lt;br /&gt;
cd avcall&lt;br /&gt;
gcc -S avcall-i386.c&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you wrapped HDF5 up for use with MinGW, add &amp;lt;tt&amp;gt;--with-hdf5dir=/c/swarm&amp;lt;/tt&amp;gt; to the list of arguments passed to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-mingw.patch&amp;lt;/tt&amp;gt; modifies the Swarm source code in the following ways:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;gettimeofday&amp;lt;/tt&amp;gt; is no longer defined in the Swarm sources as MinGW includes this function in its standard library.&lt;br /&gt;
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.&lt;br /&gt;
* The Swarm &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script defines &amp;lt;tt&amp;gt;DATADIR&amp;lt;/tt&amp;gt; as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. &amp;lt;tt&amp;gt;DATDIR&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;undef&amp;lt;/tt&amp;gt;ed in critical parts of the source code.&lt;br /&gt;
* The &amp;lt;tt&amp;gt;sleep&amp;lt;/tt&amp;gt; function is aliased to &amp;lt;tt&amp;gt;usleep&amp;lt;/tt&amp;gt;---which is the name of the MinGW implementation.&lt;br /&gt;
* The way in which Makefiles invoke &amp;lt;tt&amp;gt;gperf&amp;lt;/tt&amp;gt; is amended so that it actually produces output.&lt;br /&gt;
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.&lt;br /&gt;
&lt;br /&gt;
Full details are contained in the patchfile.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.mingw.org&lt;br /&gt;
&lt;br /&gt;
'''Current versions of MinGW include a compiler version (gcc 6.x) that is incompatible with Swarm.''' Swarm needs a version no newer than 4.6. '''IF you use a current version of MinGW your Swarm code may compile but then produce incorrect results.''' You can find on the web (a) instructions for replacing the gcc in MinGW with an older version, and (b) old versions of MinGW that contain older gcc versions. However, some of us have not had success with either of those options. At least temporarily, there is a version of MinGW that works in Windows 10 and with Swarm, [http://www.langrailsback.com/SwarmVM/ available here].&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 20110530&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.&lt;br /&gt;
&lt;br /&gt;
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.&lt;br /&gt;
&lt;br /&gt;
=== Installing MinGW ===&lt;br /&gt;
&lt;br /&gt;
MinGW can be installed by downloading the &amp;amp;quot;Automated MinGW Installer&amp;amp;quot;, which usually has a name like &amp;lt;tt&amp;gt;mingw-get-inst-&amp;amp;lt;date&amp;amp;gt;.exe&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;&amp;amp;lt;date&amp;amp;gt;&amp;lt;/tt&amp;gt; is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]&lt;br /&gt;
&lt;br /&gt;
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.&lt;br /&gt;
&lt;br /&gt;
See the following section about also installing an optional, more-functional shell window for MinGW.&lt;br /&gt;
&lt;br /&gt;
=== Using MinGW ===&lt;br /&gt;
&lt;br /&gt;
The MinGW compilers are accessible through the &amp;amp;quot;MinGW Shell&amp;amp;quot; which should be located under the MinGW folder in the Start Menu:&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]&lt;br /&gt;
&lt;br /&gt;
or by running &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; (if MinGW was installed to its default location).&lt;br /&gt;
&lt;br /&gt;
By default the MinGW shell executes inside of a Windows &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt; terminal. There are a couple major drawbacks to this:&lt;br /&gt;
&lt;br /&gt;
* You cannot resize the window to full-screen.&lt;br /&gt;
* The shell provides limited history scrollback.&lt;br /&gt;
&lt;br /&gt;
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mintty&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the &amp;lt;tt&amp;gt;mintty&amp;lt;/tt&amp;gt; command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; and changing the following line (approximately line 58):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=sh.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=mintty.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== A Note About Paths ===&lt;br /&gt;
&lt;br /&gt;
The MinGW Shell emulates a UNIX &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell and thus uses UNIX-style paths, &amp;lt;tt&amp;gt;/path/to/file&amp;lt;/tt&amp;gt;, instead of Windows-style paths, &amp;lt;tt&amp;gt;C:\path\to\file&amp;lt;/tt&amp;gt;. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (&amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt;, etc.) while a UNIX filesystem only has one root called &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;. The way this is reconciled by the &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell provided with MinGW is that &amp;lt;tt&amp;gt;/c&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt; drive, &amp;lt;tt&amp;gt;/d&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt; drive and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
The root of the filesystem itself, &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;, also has some caveats. &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; refers to the &amp;lt;tt&amp;gt;mysy&amp;lt;/tt&amp;gt; folder, &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0&amp;lt;/tt&amp;gt; in a default installation. &amp;lt;tt&amp;gt;/usr&amp;lt;/tt&amp;gt; also refers to the same location. Thus, &amp;lt;tt&amp;gt;/usr/local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/local&amp;lt;/tt&amp;gt; both refer to &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0/local&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== A Note About MinGW-64 ===&lt;br /&gt;
&lt;br /&gt;
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.&lt;br /&gt;
&lt;br /&gt;
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:&lt;br /&gt;
&lt;br /&gt;
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.&lt;br /&gt;
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.&lt;br /&gt;
&lt;br /&gt;
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].&lt;br /&gt;
&lt;br /&gt;
== Emacs ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/emacs&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 23.3&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.&lt;br /&gt;
&lt;br /&gt;
=== Installing Emacs ===&lt;br /&gt;
&lt;br /&gt;
Install Emacs by downloading one of the &amp;lt;tt&amp;gt;emacs-&amp;amp;lt;version&lt;br /&gt;
number&amp;amp;gt;-bin-i386.zip&amp;lt;/tt&amp;gt; files from the download area. Don't use any of the&lt;br /&gt;
files containing &amp;lt;tt&amp;gt;barebin&amp;lt;/tt&amp;gt;. After extracting the ZIP archive there will&lt;br /&gt;
be an Emacs folder containing a subfolder called &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt;. Add this folder&lt;br /&gt;
to your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. [[#RapidEE|RapidEE]] can help edit the&lt;br /&gt;
&amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
== GPerf ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/gperf/&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 3.0.1&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GPerf is a program that produces C code containing hash functions. The scripts&lt;br /&gt;
that build the Swarm libraries use GPerf to generate some source code files.&lt;br /&gt;
Download &amp;lt;tt&amp;gt;gperf.exe&amp;lt;/tt&amp;gt; from the GnuWin32 site on Sourceforge and place it&lt;br /&gt;
somewhere on your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. Again, [[#RapidEE|RapidEE]] can help set the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RapidEE ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.rapidee.com&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 5.0&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.rapidee.com/en/license Freeware]&lt;br /&gt;
&lt;br /&gt;
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. RapidEE may be used to edit &amp;amp;quot;System Variables&amp;amp;quot; which will affect all user accounts or &amp;amp;quot;User Variables&amp;amp;quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]&lt;br /&gt;
&lt;br /&gt;
Right-clicking on the &amp;lt;tt&amp;gt;Path&amp;lt;/tt&amp;gt; variable in the System Variables or User Variables will bring up a menu that presents the option to &amp;amp;quot;Add value&amp;amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]&lt;br /&gt;
&lt;br /&gt;
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;, must be restarted in order for them to notice the changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]&lt;br /&gt;
&lt;br /&gt;
== Depends ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.dependencywalker.com/&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 2.2&lt;br /&gt;
&lt;br /&gt;
'''License:''' Freeware&lt;br /&gt;
&lt;br /&gt;
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.&lt;br /&gt;
&lt;br /&gt;
= Software Used to Compile Swarm 2.4.1 =&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  Name&lt;br /&gt;
!  Verson Used&lt;br /&gt;
!  License&lt;br /&gt;
!  Homepage&lt;br /&gt;
!  Download Area&lt;br /&gt;
|-&lt;br /&gt;
|  ZLib&lt;br /&gt;
|  1.2.5&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG License]&lt;br /&gt;
|  [http://www.zlib.net http://www.zlib.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibFFI&lt;br /&gt;
|  3.0.9&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  [http://sourceware.org/libffi http://sourceware.org/libffi]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibPNG&lt;br /&gt;
|  1.5.4&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG]&lt;br /&gt;
|  [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  XPM-NoX&lt;br /&gt;
|  4.2.0&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  unknown&lt;br /&gt;
|  Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]&lt;br /&gt;
|-&lt;br /&gt;
|  Tcl&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Tk&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  BLT&lt;br /&gt;
|  2.4z&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://blt.sourceforge.net http://blt.sourceforge.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  HDF5&lt;br /&gt;
|  1.8.7&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Swarm&lt;br /&gt;
|  2.4.1&lt;br /&gt;
|  [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
|  [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]&lt;br /&gt;
|  [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2213</id>
		<title>Swarm and MinGW</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2213"/>
				<updated>2017-11-16T00:44:55Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: /* MinGW */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:&lt;br /&gt;
&lt;br /&gt;
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?&lt;br /&gt;
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.&lt;br /&gt;
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.&lt;br /&gt;
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.&lt;br /&gt;
&lt;br /&gt;
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.&lt;br /&gt;
&lt;br /&gt;
= Using Swarm Models Compiled with MinGW =&lt;br /&gt;
&lt;br /&gt;
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]&lt;br /&gt;
&lt;br /&gt;
However, running a Swarm model requires some support programs and libraries. These are available as&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-win32.zip&amp;lt;/tt&amp;gt;, available here:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]&lt;br /&gt;
&lt;br /&gt;
Unzipping that file will create a folder called &amp;lt;tt&amp;gt;swarm&amp;lt;/tt&amp;gt; which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before a Swarm model can be run, the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder must be added to the Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; so that Heatbugs can find necessary libraries when it runs. The &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;path=%PATH%;C:\swarm\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can alternatively add the Swarm folder to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; to the PATH system variable.&lt;br /&gt;
&lt;br /&gt;
Once the path has been set to include the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.  &lt;br /&gt;
&lt;br /&gt;
The Heatbugs model can now be run by changing the directory of the command line to the folder holding &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; and then executing the program. For example, if &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is located in &amp;lt;tt&amp;gt;C:\Users\example_user\Downloads&amp;lt;/tt&amp;gt;, then the model may be run as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd C:\Users\example_user\Downloads&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(or you can just double-click on &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)&lt;br /&gt;
&lt;br /&gt;
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]&lt;br /&gt;
&lt;br /&gt;
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; in the same directory where &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is, containing these lines: &lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, just double-clicking on &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; will start the model.&lt;br /&gt;
&lt;br /&gt;
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.&lt;br /&gt;
&lt;br /&gt;
= Installing Swarm and MinGW to compile models =&lt;br /&gt;
&lt;br /&gt;
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.&lt;br /&gt;
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
&lt;br /&gt;
The archived Swarm binaries '''MUST''' be placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt; to successfully compile Swarm models. This is because some paths had to be hard-coded by &amp;lt;tt&amp;gt;libtool&amp;lt;/tt&amp;gt; during the creation of the binaries.&lt;br /&gt;
&lt;br /&gt;
The final step before you can compile a Swarm model is to set the &amp;lt;tt&amp;gt;SWARMHOME&amp;lt;/tt&amp;gt; environment variable so that the &amp;amp;quot;make&amp;amp;quot; program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.&lt;br /&gt;
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: &amp;lt;pre&amp;gt;export SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*You can edit your Makefile so it starts with: &amp;lt;pre&amp;gt;SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add a new (User or System) variable called SWARMHOME with the value &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command &amp;amp;quot;Make&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An archive of official Swarm example programs can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]&lt;br /&gt;
&lt;br /&gt;
We will use the &amp;amp;quot;Heatbugs&amp;amp;quot; model as an example of how to compile a Swarm application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz&lt;br /&gt;
cd swarmapps-2.3.0/objc/heatbugs&lt;br /&gt;
&lt;br /&gt;
make&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''VERY IMPORTANT NOTE: MinGW produces two executables called &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt;---one in the &amp;lt;tt&amp;gt;heatbugs&amp;lt;/tt&amp;gt; folder and another in the &amp;lt;tt&amp;gt;heatbugs/.libs&amp;lt;/tt&amp;gt; folder. You should ignore the executable in the top-level folder, &amp;lt;tt&amp;gt;heatbugs/heatbugs.exe&amp;lt;/tt&amp;gt;, as it is merely a compiled wrapper script that executes &amp;lt;tt&amp;gt;heatbugs/.libs/heatbugs.exe&amp;lt;/tt&amp;gt;. When distributing compiled models, only use binaries from the &amp;lt;tt&amp;gt;.libs&amp;lt;/tt&amp;gt; folder.'''&lt;br /&gt;
&lt;br /&gt;
The resulting executable, &amp;lt;tt&amp;gt;.libs/heatbugs.exe&amp;lt;/tt&amp;gt; may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include &amp;lt;tt&amp;gt;C:\swarm\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Distributing a Swarm Model for Windows Users =&lt;br /&gt;
&lt;br /&gt;
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.&lt;br /&gt;
&lt;br /&gt;
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.&lt;br /&gt;
* Create another subdirectory that includes just the compiled model.&lt;br /&gt;
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model. &lt;br /&gt;
* Zip the whole tree up for distribution.&lt;br /&gt;
&lt;br /&gt;
The directory tree in the zip file looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\MySwarmModel\swarm&lt;br /&gt;
                      \bin&lt;br /&gt;
                      \etc&lt;br /&gt;
                      \include&lt;br /&gt;
                      \lib&lt;br /&gt;
                      \man&lt;br /&gt;
                      \share&lt;br /&gt;
               \executable\MySwarmModel.exe&lt;br /&gt;
               \Runfiles\MySwarmModel.bat (and any input files)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the file &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt; contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set SWARMHOME=C:\MySwarmModel\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
C:\MySwarmModel\executable\MySwarmModel.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then users can run the model just by double-clicking on &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Building Swarm Using MinGW =&lt;br /&gt;
&lt;br /&gt;
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.&lt;br /&gt;
&lt;br /&gt;
== Install Required Tools ==&lt;br /&gt;
&lt;br /&gt;
The first step is to download and install tools required for compiling Swarm. These links provide directions:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|MinGW]]&lt;br /&gt;
* [[#Emacs|Emacs]]&lt;br /&gt;
* [[#GPerf|GPerf]]&lt;br /&gt;
&lt;br /&gt;
== Build Support Libraries ==&lt;br /&gt;
&lt;br /&gt;
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]&lt;br /&gt;
&lt;br /&gt;
This archive contains two subdirectories:&lt;br /&gt;
&lt;br /&gt;
* sources: This folder contains the source code for each component.&lt;br /&gt;
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.&lt;br /&gt;
&lt;br /&gt;
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
mkdir build&amp;lt;/pre&amp;gt;&lt;br /&gt;
The following steps will all assume your MinGW shell is operating out of the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory. All compiled software will be installed to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt; (The Windows Explorer will see the folder appear at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== ZLib ===&lt;br /&gt;
&lt;br /&gt;
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following to build Zlib:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/zlib-1.2.5.tar.gz&lt;br /&gt;
cd zlib-1.2.5&lt;br /&gt;
make -f win32/Makefile.gcc&amp;lt;/pre&amp;gt;&lt;br /&gt;
And then the following commands to install ZLib to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir -p /c/swarm/bin&lt;br /&gt;
mkdir -p /c/swarm/include&lt;br /&gt;
mkdir -p /c/swarm/lib&lt;br /&gt;
&lt;br /&gt;
cp zlib1.dll /c/swarm/bin/&lt;br /&gt;
cp zconf.h zlib.h /c/swarm/include/&lt;br /&gt;
mv libzdll.a libz.dll.a&lt;br /&gt;
cp *.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LibPNG ===&lt;br /&gt;
&lt;br /&gt;
LibPNG will be built next as its only dependency is ZLib. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following steps to build and install LibPNG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/libpng-1.5.4.tar.bz2&lt;br /&gt;
cd libpng-1.5.4&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XPM ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, the XPM library can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/xpm-nox-4.2.0.tar.bz2&lt;br /&gt;
cd xpm-nox-4.2.0&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch&lt;br /&gt;
&lt;br /&gt;
make CC=gcc&lt;br /&gt;
make install prefix=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.&lt;br /&gt;
&lt;br /&gt;
One major modification has been made to the SUSE patchfile---&amp;lt;tt&amp;gt;tcl.h&amp;lt;/tt&amp;gt; is included in &amp;lt;tt&amp;gt;xpm.h&amp;lt;/tt&amp;gt;. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.&lt;br /&gt;
&lt;br /&gt;
=== LibFFI ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, LibFFI can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/libffi-3.0.9.tar.gz&lt;br /&gt;
cd libffi-3.0.9&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
The LibFFI headers get installed in a weird place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include&lt;br /&gt;
rm -rf /c/swarm/lib/libffi-3.0.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tcl can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tcl8.4.19-src.tar.gz&lt;br /&gt;
cd tcl8.4.19&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/tcl-8.4.19-fix-lvalues.patch&lt;br /&gt;
cd win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.&lt;br /&gt;
&lt;br /&gt;
=== Tk ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tk can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tk8.4.19-src.tar.gz&lt;br /&gt;
cd tk8.4.19/win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BLT ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, BLT can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/BLT2.4z.tar.gz&lt;br /&gt;
cd blt2.4z&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm --without-x&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HDF5 (Optional) ===&lt;br /&gt;
&lt;br /&gt;
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing &amp;lt;tt&amp;gt;.hdf&amp;lt;/tt&amp;gt; files is not needed this section can be skipped.&lt;br /&gt;
&lt;br /&gt;
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called &amp;lt;tt&amp;gt;pexports&amp;lt;/tt&amp;gt;. This can be installed using &amp;lt;tt&amp;gt;mingw-get&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mingw-utils&amp;lt;/pre&amp;gt;&lt;br /&gt;
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &amp;amp;quot;VS&amp;amp;quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd path/to/where/HDF5/was/extracted&lt;br /&gt;
&lt;br /&gt;
for dll in `ls dll/*dll`; do&lt;br /&gt;
  def_file=`basename $dll .dll`.def&lt;br /&gt;
  lib_file=lib`basename $dll dll.dll`.a&lt;br /&gt;
  pexports $dll &amp;amp;gt; $def_file&lt;br /&gt;
  dlltool -d $def_file -l lib/$lib_file&lt;br /&gt;
done&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next, move the libraries and header files needed to use HDF5 from C into &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin&lt;br /&gt;
cp include/* /c/swarm/include&lt;br /&gt;
cp lib/libhdf5.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, a patch must be applied to the HDF header file &amp;lt;tt&amp;gt;H5public.h&amp;lt;/tt&amp;gt; so that it doesn't define &amp;lt;tt&amp;gt;ssize_t&amp;lt;/tt&amp;gt;---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
patch -p1 -d /c/swarm &amp;amp;lt; patches/hdf5-1.8.7-mingw.patch&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Swarm ==&lt;br /&gt;
&lt;br /&gt;
Finally, the Swarm libraries themselves can be built. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/swarm-2.4.1.tar.gz&lt;br /&gt;
cd swarm-2.4.1&lt;br /&gt;
patch -p1 ../../patches/swarm-2.4.1-mingw.patch&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm \&lt;br /&gt;
  --with-zlibdir=/c/swarm \&lt;br /&gt;
  --with-pngdir=/c/swarm \&lt;br /&gt;
  --with-xpmdir=/c/swarm \&lt;br /&gt;
  --with-ffidir=/c/swarm \&lt;br /&gt;
  --with-tcl=/c/swarm/lib \&lt;br /&gt;
  --with-tk=/c/swarm/lib \&lt;br /&gt;
  --with-bltdir=/c/swarm&lt;br /&gt;
&lt;br /&gt;
cd avcall&lt;br /&gt;
gcc -S avcall-i386.c&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you wrapped HDF5 up for use with MinGW, add &amp;lt;tt&amp;gt;--with-hdf5dir=/c/swarm&amp;lt;/tt&amp;gt; to the list of arguments passed to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-mingw.patch&amp;lt;/tt&amp;gt; modifies the Swarm source code in the following ways:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;gettimeofday&amp;lt;/tt&amp;gt; is no longer defined in the Swarm sources as MinGW includes this function in its standard library.&lt;br /&gt;
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.&lt;br /&gt;
* The Swarm &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script defines &amp;lt;tt&amp;gt;DATADIR&amp;lt;/tt&amp;gt; as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. &amp;lt;tt&amp;gt;DATDIR&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;undef&amp;lt;/tt&amp;gt;ed in critical parts of the source code.&lt;br /&gt;
* The &amp;lt;tt&amp;gt;sleep&amp;lt;/tt&amp;gt; function is aliased to &amp;lt;tt&amp;gt;usleep&amp;lt;/tt&amp;gt;---which is the name of the MinGW implementation.&lt;br /&gt;
* The way in which Makefiles invoke &amp;lt;tt&amp;gt;gperf&amp;lt;/tt&amp;gt; is amended so that it actually produces output.&lt;br /&gt;
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.&lt;br /&gt;
&lt;br /&gt;
Full details are contained in the patchfile.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.mingw.org&lt;br /&gt;
&lt;br /&gt;
'''Now, for Swarm, you must use an older version of MinGW with compiler (gcc) version of 4.6.x or earlier.''' Search the web for a file like this x86_64-w64-mingw32-gcc-4.5.3-release-linux_rubenvb.tar.lzma and follow instructions for installing. '''IF you use a later version of MinGW (e.g., 6.x) your Swarm code may compile but then produce incorrect results.'''&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 20110530&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.&lt;br /&gt;
&lt;br /&gt;
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.&lt;br /&gt;
&lt;br /&gt;
=== Installing MinGW ===&lt;br /&gt;
&lt;br /&gt;
MinGW can be installed by downloading the &amp;amp;quot;Automated MinGW Installer&amp;amp;quot;, which usually has a name like &amp;lt;tt&amp;gt;mingw-get-inst-&amp;amp;lt;date&amp;amp;gt;.exe&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;&amp;amp;lt;date&amp;amp;gt;&amp;lt;/tt&amp;gt; is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]&lt;br /&gt;
&lt;br /&gt;
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.&lt;br /&gt;
&lt;br /&gt;
See the following section about also installing an optional, more-functional shell window for MinGW.&lt;br /&gt;
&lt;br /&gt;
=== Using MinGW ===&lt;br /&gt;
&lt;br /&gt;
The MinGW compilers are accessible through the &amp;amp;quot;MinGW Shell&amp;amp;quot; which should be located under the MinGW folder in the Start Menu:&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]&lt;br /&gt;
&lt;br /&gt;
or by running &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; (if MinGW was installed to its default location).&lt;br /&gt;
&lt;br /&gt;
By default the MinGW shell executes inside of a Windows &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt; terminal. There are a couple major drawbacks to this:&lt;br /&gt;
&lt;br /&gt;
* You cannot resize the window to full-screen.&lt;br /&gt;
* The shell provides limited history scrollback.&lt;br /&gt;
&lt;br /&gt;
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mintty&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the &amp;lt;tt&amp;gt;mintty&amp;lt;/tt&amp;gt; command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; and changing the following line (approximately line 58):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=sh.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=mintty.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== A Note About Paths ===&lt;br /&gt;
&lt;br /&gt;
The MinGW Shell emulates a UNIX &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell and thus uses UNIX-style paths, &amp;lt;tt&amp;gt;/path/to/file&amp;lt;/tt&amp;gt;, instead of Windows-style paths, &amp;lt;tt&amp;gt;C:\path\to\file&amp;lt;/tt&amp;gt;. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (&amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt;, etc.) while a UNIX filesystem only has one root called &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;. The way this is reconciled by the &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell provided with MinGW is that &amp;lt;tt&amp;gt;/c&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt; drive, &amp;lt;tt&amp;gt;/d&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt; drive and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
The root of the filesystem itself, &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;, also has some caveats. &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; refers to the &amp;lt;tt&amp;gt;mysy&amp;lt;/tt&amp;gt; folder, &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0&amp;lt;/tt&amp;gt; in a default installation. &amp;lt;tt&amp;gt;/usr&amp;lt;/tt&amp;gt; also refers to the same location. Thus, &amp;lt;tt&amp;gt;/usr/local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/local&amp;lt;/tt&amp;gt; both refer to &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0/local&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== A Note About MinGW-64 ===&lt;br /&gt;
&lt;br /&gt;
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.&lt;br /&gt;
&lt;br /&gt;
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:&lt;br /&gt;
&lt;br /&gt;
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.&lt;br /&gt;
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.&lt;br /&gt;
&lt;br /&gt;
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].&lt;br /&gt;
&lt;br /&gt;
== Emacs ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/emacs&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 23.3&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.&lt;br /&gt;
&lt;br /&gt;
=== Installing Emacs ===&lt;br /&gt;
&lt;br /&gt;
Install Emacs by downloading one of the &amp;lt;tt&amp;gt;emacs-&amp;amp;lt;version&lt;br /&gt;
number&amp;amp;gt;-bin-i386.zip&amp;lt;/tt&amp;gt; files from the download area. Don't use any of the&lt;br /&gt;
files containing &amp;lt;tt&amp;gt;barebin&amp;lt;/tt&amp;gt;. After extracting the ZIP archive there will&lt;br /&gt;
be an Emacs folder containing a subfolder called &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt;. Add this folder&lt;br /&gt;
to your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. [[#RapidEE|RapidEE]] can help edit the&lt;br /&gt;
&amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
== GPerf ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/gperf/&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 3.0.1&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GPerf is a program that produces C code containing hash functions. The scripts&lt;br /&gt;
that build the Swarm libraries use GPerf to generate some source code files.&lt;br /&gt;
Download &amp;lt;tt&amp;gt;gperf.exe&amp;lt;/tt&amp;gt; from the GnuWin32 site on Sourceforge and place it&lt;br /&gt;
somewhere on your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. Again, [[#RapidEE|RapidEE]] can help set the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RapidEE ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.rapidee.com&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 5.0&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.rapidee.com/en/license Freeware]&lt;br /&gt;
&lt;br /&gt;
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. RapidEE may be used to edit &amp;amp;quot;System Variables&amp;amp;quot; which will affect all user accounts or &amp;amp;quot;User Variables&amp;amp;quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]&lt;br /&gt;
&lt;br /&gt;
Right-clicking on the &amp;lt;tt&amp;gt;Path&amp;lt;/tt&amp;gt; variable in the System Variables or User Variables will bring up a menu that presents the option to &amp;amp;quot;Add value&amp;amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]&lt;br /&gt;
&lt;br /&gt;
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;, must be restarted in order for them to notice the changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]&lt;br /&gt;
&lt;br /&gt;
== Depends ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.dependencywalker.com/&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 2.2&lt;br /&gt;
&lt;br /&gt;
'''License:''' Freeware&lt;br /&gt;
&lt;br /&gt;
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.&lt;br /&gt;
&lt;br /&gt;
= Software Used to Compile Swarm 2.4.1 =&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  Name&lt;br /&gt;
!  Verson Used&lt;br /&gt;
!  License&lt;br /&gt;
!  Homepage&lt;br /&gt;
!  Download Area&lt;br /&gt;
|-&lt;br /&gt;
|  ZLib&lt;br /&gt;
|  1.2.5&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG License]&lt;br /&gt;
|  [http://www.zlib.net http://www.zlib.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibFFI&lt;br /&gt;
|  3.0.9&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  [http://sourceware.org/libffi http://sourceware.org/libffi]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibPNG&lt;br /&gt;
|  1.5.4&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG]&lt;br /&gt;
|  [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  XPM-NoX&lt;br /&gt;
|  4.2.0&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  unknown&lt;br /&gt;
|  Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]&lt;br /&gt;
|-&lt;br /&gt;
|  Tcl&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Tk&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  BLT&lt;br /&gt;
|  2.4z&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://blt.sourceforge.net http://blt.sourceforge.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  HDF5&lt;br /&gt;
|  1.8.7&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Swarm&lt;br /&gt;
|  2.4.1&lt;br /&gt;
|  [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
|  [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]&lt;br /&gt;
|  [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2212</id>
		<title>Swarm and MinGW</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Swarm_and_MinGW&amp;diff=2212"/>
				<updated>2017-11-16T00:43:22Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: /* MinGW */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:&lt;br /&gt;
&lt;br /&gt;
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?&lt;br /&gt;
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.&lt;br /&gt;
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.&lt;br /&gt;
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.&lt;br /&gt;
&lt;br /&gt;
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.&lt;br /&gt;
&lt;br /&gt;
= Using Swarm Models Compiled with MinGW =&lt;br /&gt;
&lt;br /&gt;
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]&lt;br /&gt;
&lt;br /&gt;
However, running a Swarm model requires some support programs and libraries. These are available as&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-win32.zip&amp;lt;/tt&amp;gt;, available here:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]&lt;br /&gt;
&lt;br /&gt;
Unzipping that file will create a folder called &amp;lt;tt&amp;gt;swarm&amp;lt;/tt&amp;gt; which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Before a Swarm model can be run, the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder must be added to the Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; so that Heatbugs can find necessary libraries when it runs. The &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;path=%PATH%;C:\swarm\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
You can alternatively add the Swarm folder to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; to the PATH system variable.&lt;br /&gt;
&lt;br /&gt;
Once the path has been set to include the &amp;lt;tt&amp;gt;swarm\bin&amp;lt;/tt&amp;gt; folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.  &lt;br /&gt;
&lt;br /&gt;
The Heatbugs model can now be run by changing the directory of the command line to the folder holding &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; and then executing the program. For example, if &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is located in &amp;lt;tt&amp;gt;C:\Users\example_user\Downloads&amp;lt;/tt&amp;gt;, then the model may be run as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd C:\Users\example_user\Downloads&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(or you can just double-click on &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)&lt;br /&gt;
&lt;br /&gt;
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]&lt;br /&gt;
&lt;br /&gt;
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; in the same directory where &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt; is, containing these lines: &lt;br /&gt;
&amp;lt;pre&amp;gt;SWARMHOME=C:\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
heatbugs.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, just double-clicking on &amp;lt;tt&amp;gt;heatbugs.bat&amp;lt;/tt&amp;gt; will start the model.&lt;br /&gt;
&lt;br /&gt;
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.&lt;br /&gt;
&lt;br /&gt;
= Installing Swarm and MinGW to compile models =&lt;br /&gt;
&lt;br /&gt;
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.&lt;br /&gt;
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
&lt;br /&gt;
The archived Swarm binaries '''MUST''' be placed at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt; to successfully compile Swarm models. This is because some paths had to be hard-coded by &amp;lt;tt&amp;gt;libtool&amp;lt;/tt&amp;gt; during the creation of the binaries.&lt;br /&gt;
&lt;br /&gt;
The final step before you can compile a Swarm model is to set the &amp;lt;tt&amp;gt;SWARMHOME&amp;lt;/tt&amp;gt; environment variable so that the &amp;amp;quot;make&amp;amp;quot; program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.&lt;br /&gt;
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: &amp;lt;pre&amp;gt;export SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*You can edit your Makefile so it starts with: &amp;lt;pre&amp;gt;SWARMHOME=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel &amp;amp;gt; System &amp;amp;gt; Advanced &amp;amp;gt; Environment Variables to add a new (User or System) variable called SWARMHOME with the value &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command &amp;amp;quot;Make&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
An archive of official Swarm example programs can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]&lt;br /&gt;
&lt;br /&gt;
We will use the &amp;amp;quot;Heatbugs&amp;amp;quot; model as an example of how to compile a Swarm application:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz&lt;br /&gt;
cd swarmapps-2.3.0/objc/heatbugs&lt;br /&gt;
&lt;br /&gt;
make&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''VERY IMPORTANT NOTE: MinGW produces two executables called &amp;lt;tt&amp;gt;heatbugs.exe&amp;lt;/tt&amp;gt;---one in the &amp;lt;tt&amp;gt;heatbugs&amp;lt;/tt&amp;gt; folder and another in the &amp;lt;tt&amp;gt;heatbugs/.libs&amp;lt;/tt&amp;gt; folder. You should ignore the executable in the top-level folder, &amp;lt;tt&amp;gt;heatbugs/heatbugs.exe&amp;lt;/tt&amp;gt;, as it is merely a compiled wrapper script that executes &amp;lt;tt&amp;gt;heatbugs/.libs/heatbugs.exe&amp;lt;/tt&amp;gt;. When distributing compiled models, only use binaries from the &amp;lt;tt&amp;gt;.libs&amp;lt;/tt&amp;gt; folder.'''&lt;br /&gt;
&lt;br /&gt;
The resulting executable, &amp;lt;tt&amp;gt;.libs/heatbugs.exe&amp;lt;/tt&amp;gt; may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include &amp;lt;tt&amp;gt;C:\swarm\bin&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Distributing a Swarm Model for Windows Users =&lt;br /&gt;
&lt;br /&gt;
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.&lt;br /&gt;
&lt;br /&gt;
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.&lt;br /&gt;
* Create another subdirectory that includes just the compiled model.&lt;br /&gt;
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model. &lt;br /&gt;
* Zip the whole tree up for distribution.&lt;br /&gt;
&lt;br /&gt;
The directory tree in the zip file looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\MySwarmModel\swarm&lt;br /&gt;
                      \bin&lt;br /&gt;
                      \etc&lt;br /&gt;
                      \include&lt;br /&gt;
                      \lib&lt;br /&gt;
                      \man&lt;br /&gt;
                      \share&lt;br /&gt;
               \executable\MySwarmModel.exe&lt;br /&gt;
               \Runfiles\MySwarmModel.bat (and any input files)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the file &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt; contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set SWARMHOME=C:\MySwarmModel\swarm&lt;br /&gt;
path=%SWARMHOME%\bin;%PATH%&lt;br /&gt;
C:\MySwarmModel\executable\MySwarmModel.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then users can run the model just by double-clicking on &amp;lt;tt&amp;gt;MySwarmModel.bat&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Building Swarm Using MinGW =&lt;br /&gt;
&lt;br /&gt;
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.&lt;br /&gt;
&lt;br /&gt;
== Install Required Tools ==&lt;br /&gt;
&lt;br /&gt;
The first step is to download and install tools required for compiling Swarm. These links provide directions:&lt;br /&gt;
&lt;br /&gt;
* [[#MinGW|MinGW]]&lt;br /&gt;
* [[#Emacs|Emacs]]&lt;br /&gt;
* [[#GPerf|GPerf]]&lt;br /&gt;
&lt;br /&gt;
== Build Support Libraries ==&lt;br /&gt;
&lt;br /&gt;
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:&lt;br /&gt;
&lt;br /&gt;
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]&lt;br /&gt;
&lt;br /&gt;
This archive contains two subdirectories:&lt;br /&gt;
&lt;br /&gt;
* sources: This folder contains the source code for each component.&lt;br /&gt;
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.&lt;br /&gt;
&lt;br /&gt;
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
mkdir build&amp;lt;/pre&amp;gt;&lt;br /&gt;
The following steps will all assume your MinGW shell is operating out of the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory. All compiled software will be installed to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt; (The Windows Explorer will see the folder appear at &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== ZLib ===&lt;br /&gt;
&lt;br /&gt;
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following to build Zlib:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/zlib-1.2.5.tar.gz&lt;br /&gt;
cd zlib-1.2.5&lt;br /&gt;
make -f win32/Makefile.gcc&amp;lt;/pre&amp;gt;&lt;br /&gt;
And then the following commands to install ZLib to &amp;lt;tt&amp;gt;/c/swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir -p /c/swarm/bin&lt;br /&gt;
mkdir -p /c/swarm/include&lt;br /&gt;
mkdir -p /c/swarm/lib&lt;br /&gt;
&lt;br /&gt;
cp zlib1.dll /c/swarm/bin/&lt;br /&gt;
cp zconf.h zlib.h /c/swarm/include/&lt;br /&gt;
mv libzdll.a libz.dll.a&lt;br /&gt;
cp *.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LibPNG ===&lt;br /&gt;
&lt;br /&gt;
LibPNG will be built next as its only dependency is ZLib. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following steps to build and install LibPNG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/libpng-1.5.4.tar.bz2&lt;br /&gt;
cd libpng-1.5.4&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== XPM ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, the XPM library can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xjf ../sources/xpm-nox-4.2.0.tar.bz2&lt;br /&gt;
cd xpm-nox-4.2.0&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch&lt;br /&gt;
&lt;br /&gt;
make CC=gcc&lt;br /&gt;
make install prefix=/c/swarm&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.&lt;br /&gt;
&lt;br /&gt;
One major modification has been made to the SUSE patchfile---&amp;lt;tt&amp;gt;tcl.h&amp;lt;/tt&amp;gt; is included in &amp;lt;tt&amp;gt;xpm.h&amp;lt;/tt&amp;gt;. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.&lt;br /&gt;
&lt;br /&gt;
=== LibFFI ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, LibFFI can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/libffi-3.0.9.tar.gz&lt;br /&gt;
cd libffi-3.0.9&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
The LibFFI headers get installed in a weird place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include&lt;br /&gt;
rm -rf /c/swarm/lib/libffi-3.0.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Tcl ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tcl can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tcl8.4.19-src.tar.gz&lt;br /&gt;
cd tcl8.4.19&lt;br /&gt;
patch -p1 &amp;amp;lt; ../../patches/tcl-8.4.19-fix-lvalues.patch&lt;br /&gt;
cd win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.&lt;br /&gt;
&lt;br /&gt;
=== Tk ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, Tk can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/tk8.4.19-src.tar.gz&lt;br /&gt;
cd tk8.4.19/win&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BLT ===&lt;br /&gt;
&lt;br /&gt;
Starting from the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, BLT can be built and installed as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/BLT2.4z.tar.gz&lt;br /&gt;
cd blt2.4z&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/c/swarm --without-x&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== HDF5 (Optional) ===&lt;br /&gt;
&lt;br /&gt;
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing &amp;lt;tt&amp;gt;.hdf&amp;lt;/tt&amp;gt; files is not needed this section can be skipped.&lt;br /&gt;
&lt;br /&gt;
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called &amp;lt;tt&amp;gt;pexports&amp;lt;/tt&amp;gt;. This can be installed using &amp;lt;tt&amp;gt;mingw-get&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mingw-utils&amp;lt;/pre&amp;gt;&lt;br /&gt;
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &amp;amp;quot;VS&amp;amp;quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd path/to/where/HDF5/was/extracted&lt;br /&gt;
&lt;br /&gt;
for dll in `ls dll/*dll`; do&lt;br /&gt;
  def_file=`basename $dll .dll`.def&lt;br /&gt;
  lib_file=lib`basename $dll dll.dll`.a&lt;br /&gt;
  pexports $dll &amp;amp;gt; $def_file&lt;br /&gt;
  dlltool -d $def_file -l lib/$lib_file&lt;br /&gt;
done&amp;lt;/pre&amp;gt;&lt;br /&gt;
Next, move the libraries and header files needed to use HDF5 from C into &amp;lt;tt&amp;gt;C:\swarm&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin&lt;br /&gt;
cp include/* /c/swarm/include&lt;br /&gt;
cp lib/libhdf5.a /c/swarm/lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, a patch must be applied to the HDF header file &amp;lt;tt&amp;gt;H5public.h&amp;lt;/tt&amp;gt; so that it doesn't define &amp;lt;tt&amp;gt;ssize_t&amp;lt;/tt&amp;gt;---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/where/swarm/source/was/extracted&lt;br /&gt;
patch -p1 -d /c/swarm &amp;amp;lt; patches/hdf5-1.8.7-mingw.patch&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Swarm ==&lt;br /&gt;
&lt;br /&gt;
Finally, the Swarm libraries themselves can be built. From the &amp;lt;tt&amp;gt;build&amp;lt;/tt&amp;gt; directory, execute the following&lt;br /&gt;
&amp;lt;pre&amp;gt;tar xzf ../sources/swarm-2.4.1.tar.gz&lt;br /&gt;
cd swarm-2.4.1&lt;br /&gt;
patch -p1 ../../patches/swarm-2.4.1-mingw.patch&lt;br /&gt;
&lt;br /&gt;
export CPPFLAGS='-I/c/swarm/include'&lt;br /&gt;
export LDFLAGS='-L/c/swarm/lib'&lt;br /&gt;
./configure --prefix=/c/swarm \&lt;br /&gt;
  --with-zlibdir=/c/swarm \&lt;br /&gt;
  --with-pngdir=/c/swarm \&lt;br /&gt;
  --with-xpmdir=/c/swarm \&lt;br /&gt;
  --with-ffidir=/c/swarm \&lt;br /&gt;
  --with-tcl=/c/swarm/lib \&lt;br /&gt;
  --with-tk=/c/swarm/lib \&lt;br /&gt;
  --with-bltdir=/c/swarm&lt;br /&gt;
&lt;br /&gt;
cd avcall&lt;br /&gt;
gcc -S avcall-i386.c&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you wrapped HDF5 up for use with MinGW, add &amp;lt;tt&amp;gt;--with-hdf5dir=/c/swarm&amp;lt;/tt&amp;gt; to the list of arguments passed to &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Summary of patchfile changes:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;swarm-2.4.1-mingw.patch&amp;lt;/tt&amp;gt; modifies the Swarm source code in the following ways:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;tt&amp;gt;gettimeofday&amp;lt;/tt&amp;gt; is no longer defined in the Swarm sources as MinGW includes this function in its standard library.&lt;br /&gt;
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.&lt;br /&gt;
* The Swarm &amp;lt;tt&amp;gt;configure&amp;lt;/tt&amp;gt; script defines &amp;lt;tt&amp;gt;DATADIR&amp;lt;/tt&amp;gt; as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. &amp;lt;tt&amp;gt;DATDIR&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;undef&amp;lt;/tt&amp;gt;ed in critical parts of the source code.&lt;br /&gt;
* The &amp;lt;tt&amp;gt;sleep&amp;lt;/tt&amp;gt; function is aliased to &amp;lt;tt&amp;gt;usleep&amp;lt;/tt&amp;gt;---which is the name of the MinGW implementation.&lt;br /&gt;
* The way in which Makefiles invoke &amp;lt;tt&amp;gt;gperf&amp;lt;/tt&amp;gt; is amended so that it actually produces output.&lt;br /&gt;
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.&lt;br /&gt;
&lt;br /&gt;
Full details are contained in the patchfile.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
== MinGW ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.mingw.org&lt;br /&gt;
&lt;br /&gt;
'''Now, for Swarm, you must use an older version of MinGW with compiler (gcc) version of 4.6.x or earlier.''' Search the web for a file like this x86_64-w64-mingw32-gcc-4.5.3-release-linux_rubenvb.tar.lzma and follow instructions for installing.&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 20110530&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.&lt;br /&gt;
&lt;br /&gt;
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.&lt;br /&gt;
&lt;br /&gt;
=== Installing MinGW ===&lt;br /&gt;
&lt;br /&gt;
MinGW can be installed by downloading the &amp;amp;quot;Automated MinGW Installer&amp;amp;quot;, which usually has a name like &amp;lt;tt&amp;gt;mingw-get-inst-&amp;amp;lt;date&amp;amp;gt;.exe&amp;lt;/tt&amp;gt; where &amp;lt;tt&amp;gt;&amp;amp;lt;date&amp;amp;gt;&amp;lt;/tt&amp;gt; is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]&lt;br /&gt;
&lt;br /&gt;
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.&lt;br /&gt;
&lt;br /&gt;
See the following section about also installing an optional, more-functional shell window for MinGW.&lt;br /&gt;
&lt;br /&gt;
=== Using MinGW ===&lt;br /&gt;
&lt;br /&gt;
The MinGW compilers are accessible through the &amp;amp;quot;MinGW Shell&amp;amp;quot; which should be located under the MinGW folder in the Start Menu:&lt;br /&gt;
&lt;br /&gt;
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]&lt;br /&gt;
&lt;br /&gt;
or by running &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; (if MinGW was installed to its default location).&lt;br /&gt;
&lt;br /&gt;
By default the MinGW shell executes inside of a Windows &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt; terminal. There are a couple major drawbacks to this:&lt;br /&gt;
&lt;br /&gt;
* You cannot resize the window to full-screen.&lt;br /&gt;
* The shell provides limited history scrollback.&lt;br /&gt;
&lt;br /&gt;
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mingw-get install mintty&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the &amp;lt;tt&amp;gt;mintty&amp;lt;/tt&amp;gt; command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file &amp;lt;tt&amp;gt;C:\MinGW\msys\1.0\msys.bat&amp;lt;/tt&amp;gt; and changing the following line (approximately line 58):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=sh.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if &amp;amp;quot;x%MSYSCON%&amp;amp;quot; == &amp;amp;quot;xunknown&amp;amp;quot; set MSYSCON=mintty.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== A Note About Paths ===&lt;br /&gt;
&lt;br /&gt;
The MinGW Shell emulates a UNIX &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell and thus uses UNIX-style paths, &amp;lt;tt&amp;gt;/path/to/file&amp;lt;/tt&amp;gt;, instead of Windows-style paths, &amp;lt;tt&amp;gt;C:\path\to\file&amp;lt;/tt&amp;gt;. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (&amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt;, etc.) while a UNIX filesystem only has one root called &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;. The way this is reconciled by the &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; shell provided with MinGW is that &amp;lt;tt&amp;gt;/c&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;C:&amp;lt;/tt&amp;gt; drive, &amp;lt;tt&amp;gt;/d&amp;lt;/tt&amp;gt; refers to the root of the &amp;lt;tt&amp;gt;D:&amp;lt;/tt&amp;gt; drive and so on and so forth.&lt;br /&gt;
&lt;br /&gt;
The root of the filesystem itself, &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt;, also has some caveats. &amp;lt;tt&amp;gt;/&amp;lt;/tt&amp;gt; refers to the &amp;lt;tt&amp;gt;mysy&amp;lt;/tt&amp;gt; folder, &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0&amp;lt;/tt&amp;gt; in a default installation. &amp;lt;tt&amp;gt;/usr&amp;lt;/tt&amp;gt; also refers to the same location. Thus, &amp;lt;tt&amp;gt;/usr/local&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/local&amp;lt;/tt&amp;gt; both refer to &amp;lt;tt&amp;gt;C:/MinGW/mysys/1.0/local&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== A Note About MinGW-64 ===&lt;br /&gt;
&lt;br /&gt;
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.&lt;br /&gt;
&lt;br /&gt;
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:&lt;br /&gt;
&lt;br /&gt;
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.&lt;br /&gt;
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.&lt;br /&gt;
&lt;br /&gt;
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].&lt;br /&gt;
&lt;br /&gt;
== Emacs ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/emacs&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 23.3&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.&lt;br /&gt;
&lt;br /&gt;
=== Installing Emacs ===&lt;br /&gt;
&lt;br /&gt;
Install Emacs by downloading one of the &amp;lt;tt&amp;gt;emacs-&amp;amp;lt;version&lt;br /&gt;
number&amp;amp;gt;-bin-i386.zip&amp;lt;/tt&amp;gt; files from the download area. Don't use any of the&lt;br /&gt;
files containing &amp;lt;tt&amp;gt;barebin&amp;lt;/tt&amp;gt;. After extracting the ZIP archive there will&lt;br /&gt;
be an Emacs folder containing a subfolder called &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt;. Add this folder&lt;br /&gt;
to your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. [[#RapidEE|RapidEE]] can help edit the&lt;br /&gt;
&amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
== GPerf ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.gnu.org/software/gperf/&lt;br /&gt;
&lt;br /&gt;
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 3.0.1&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
&lt;br /&gt;
GPerf is a program that produces C code containing hash functions. The scripts&lt;br /&gt;
that build the Swarm libraries use GPerf to generate some source code files.&lt;br /&gt;
Download &amp;lt;tt&amp;gt;gperf.exe&amp;lt;/tt&amp;gt; from the GnuWin32 site on Sourceforge and place it&lt;br /&gt;
somewhere on your Windows &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. Again, [[#RapidEE|RapidEE]] can help set the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RapidEE ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.rapidee.com&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 5.0&lt;br /&gt;
&lt;br /&gt;
'''License:''' [http://www.rapidee.com/en/license Freeware]&lt;br /&gt;
&lt;br /&gt;
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;. RapidEE may be used to edit &amp;amp;quot;System Variables&amp;amp;quot; which will affect all user accounts or &amp;amp;quot;User Variables&amp;amp;quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]&lt;br /&gt;
&lt;br /&gt;
Right-clicking on the &amp;lt;tt&amp;gt;Path&amp;lt;/tt&amp;gt; variable in the System Variables or User Variables will bring up a menu that presents the option to &amp;amp;quot;Add value&amp;amp;quot;:&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]&lt;br /&gt;
&lt;br /&gt;
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as &amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;, must be restarted in order for them to notice the changes.&lt;br /&gt;
&lt;br /&gt;
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]&lt;br /&gt;
&lt;br /&gt;
== Depends ==&lt;br /&gt;
&lt;br /&gt;
'''Homepage:''' http://www.dependencywalker.com/&lt;br /&gt;
&lt;br /&gt;
'''Version Used:''' 2.2&lt;br /&gt;
&lt;br /&gt;
'''License:''' Freeware&lt;br /&gt;
&lt;br /&gt;
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.&lt;br /&gt;
&lt;br /&gt;
= Software Used to Compile Swarm 2.4.1 =&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
!  Name&lt;br /&gt;
!  Verson Used&lt;br /&gt;
!  License&lt;br /&gt;
!  Homepage&lt;br /&gt;
!  Download Area&lt;br /&gt;
|-&lt;br /&gt;
|  ZLib&lt;br /&gt;
|  1.2.5&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG License]&lt;br /&gt;
|  [http://www.zlib.net http://www.zlib.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibFFI&lt;br /&gt;
|  3.0.9&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  [http://sourceware.org/libffi http://sourceware.org/libffi]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  LibPNG&lt;br /&gt;
|  1.5.4&lt;br /&gt;
|  [http://www.opensource.org/licenses/Zlib ZLib/PNG]&lt;br /&gt;
|  [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  XPM-NoX&lt;br /&gt;
|  4.2.0&lt;br /&gt;
|  [http://www.opensource.org/licenses/MIT MIT]&lt;br /&gt;
|  unknown&lt;br /&gt;
|  Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]&lt;br /&gt;
|-&lt;br /&gt;
|  Tcl&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Tk&lt;br /&gt;
|  8.4.19&lt;br /&gt;
|  [http://www.tcl.tk/software/tcltk/license.html Tcl]&lt;br /&gt;
|  [http://www.tcl.tk http://www.tcl.tk]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  BLT&lt;br /&gt;
|  2.4z&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://blt.sourceforge.net http://blt.sourceforge.net]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  HDF5&lt;br /&gt;
|  1.8.7&lt;br /&gt;
|  [http://www.opensource.org/licenses/BSD-3-Clause BSD]&lt;br /&gt;
|  [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]&lt;br /&gt;
|  --&lt;br /&gt;
|-&lt;br /&gt;
|  Swarm&lt;br /&gt;
|  2.4.1&lt;br /&gt;
|  [http://www.opensource.org/licenses/GPL-3.0 GPL]&lt;br /&gt;
|  [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]&lt;br /&gt;
|  [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Swarm:Stable_release&amp;diff=2211</id>
		<title>Swarm:Stable release</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Swarm:Stable_release&amp;diff=2211"/>
				<updated>2017-10-22T16:43:38Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: /* Packaged (binary) distributions (2.2) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Stable release: Swarm 2.2==&lt;br /&gt;
&lt;br /&gt;
 The following text is partially obsolete: The last stable release of Swarm is 2.4.1, but it was not packaged for Windows using Cygwin. The current Windows package uses MinGW instead of Cygwin.&lt;br /&gt;
&lt;br /&gt;
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000). &lt;br /&gt;
&lt;br /&gt;
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.&lt;br /&gt;
&lt;br /&gt;
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.&lt;br /&gt;
&lt;br /&gt;
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.&lt;br /&gt;
&lt;br /&gt;
NEWS (user-visible changes)&lt;br /&gt;
&lt;br /&gt;
 * '''See the list of known bugs''', below!&lt;br /&gt;
 * Release Notes for Swarm 2.2&lt;br /&gt;
 ** Numerous bugs have been fixed since 2.1.1&lt;br /&gt;
 ** MacOS X is now supported&lt;br /&gt;
 ** The Windows binaries for java Swarm now use the MingW compiler.&lt;br /&gt;
 ** Two new probability distributions (binomial, Poisson) have been added &lt;br /&gt;
    to the Random library.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.&lt;br /&gt;
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).&lt;br /&gt;
&lt;br /&gt;
==Packaged (binary) distributions (2.2)==&lt;br /&gt;
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.&lt;br /&gt;
&lt;br /&gt;
===VirtualBox virtual Linux machine with Swarm===&lt;br /&gt;
&lt;br /&gt;
Steve Railsback created a virtual machine with Swarm for Oracle's VirtualBox software. The machine runs the CentOS 6 Linux distribution, one of the last supported distributions that uses, by default, a version (4.4) of the GCC compiler that Swarm is compatible with. In theory this virtual machine could be imported to VirtualBox running on any operating system. If you want to try it, contact Steve: Steve at LangRailsback.com  October 2017.&lt;br /&gt;
&lt;br /&gt;
===Windows binaries===&lt;br /&gt;
 The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].&lt;br /&gt;
&lt;br /&gt;
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...&lt;br /&gt;
&lt;br /&gt;
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]]. &lt;br /&gt;
&lt;br /&gt;
The Windows binaries are installed via a setup program at:&lt;br /&gt;
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe&lt;br /&gt;
&lt;br /&gt;
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)&lt;br /&gt;
&lt;br /&gt;
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:&lt;br /&gt;
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz&lt;br /&gt;
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip&lt;br /&gt;
&lt;br /&gt;
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.&lt;br /&gt;
&lt;br /&gt;
===GNU/Linux binaries===&lt;br /&gt;
&lt;br /&gt;
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.&lt;br /&gt;
&lt;br /&gt;
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via: &lt;br /&gt;
&lt;br /&gt;
 sudo apt-add-repository ppa:sdg-team/stable&lt;br /&gt;
 sudo apt-get update&lt;br /&gt;
 sudo apt-get install libswarm2-dev gobjc-4.5&lt;br /&gt;
&lt;br /&gt;
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.&lt;br /&gt;
&lt;br /&gt;
===MacOS X binaries===&lt;br /&gt;
&lt;br /&gt;
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]]  These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available.  There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.&lt;br /&gt;
&lt;br /&gt;
===Other platforms===&lt;br /&gt;
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.&lt;br /&gt;
&lt;br /&gt;
===Binaries of previous versions===&lt;br /&gt;
Legacy binaries (unmaintained) are available here:&lt;br /&gt;
*http://download.savannah.gnu.org/releases/swarm/binaries/old/&lt;br /&gt;
&lt;br /&gt;
==Swarm source (2.4)==&lt;br /&gt;
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:&lt;br /&gt;
*http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz&lt;br /&gt;
&lt;br /&gt;
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:&lt;br /&gt;
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution&lt;br /&gt;
* BLT 2.4z, not 3.0&lt;br /&gt;
* libpng 1.2.5&lt;br /&gt;
* zlib 1.2.2&lt;br /&gt;
* xpm-4.2 (or the xpm-nox package for Cygwin)&lt;br /&gt;
* X11R6 on Linux and MacOS X (with SDK)&lt;br /&gt;
* Optionally, HDF5 1.6.2&lt;br /&gt;
* Optionally, Java SDK 1.4.2&lt;br /&gt;
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)&lt;br /&gt;
* GNU Make&lt;br /&gt;
&lt;br /&gt;
These packages and information on installing them for Swarm are at: [[Swarm_and_MinGW]]&lt;br /&gt;
&lt;br /&gt;
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the &amp;lt;tt&amp;gt;README&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;INSTALL&amp;lt;/tt&amp;gt; file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using &amp;lt;tt&amp;gt;make&amp;lt;/tt&amp;gt; as usual, after this step. &lt;br /&gt;
&lt;br /&gt;
You also need an explicit &amp;lt;tt&amp;gt;make install&amp;lt;/tt&amp;gt; step, after the initial &amp;lt;tt&amp;gt;make build&amp;lt;/tt&amp;gt; to cleanly install Swarm to an appropriate location (for example &amp;lt;tt&amp;gt;/usr/local&amp;lt;/tt&amp;gt;). This is explained futher in the &amp;lt;tt&amp;gt;README&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;INSTALL&amp;lt;/tt&amp;gt; files contained in the distribution.&lt;br /&gt;
&lt;br /&gt;
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.&lt;br /&gt;
&lt;br /&gt;
==Known bugs and fixes==&lt;br /&gt;
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.&lt;br /&gt;
&lt;br /&gt;
===Error in &amp;amp;lt;tt&amp;amp;gt;Averager&amp;amp;lt;/tt&amp;amp;gt; minimum, maximum values===&lt;br /&gt;
Swarm's &amp;amp;lt;tt&amp;amp;gt;Averager&amp;amp;lt;/tt&amp;amp;gt; class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''&amp;amp;lt;tt&amp;amp;gt;getMin&amp;amp;lt;/tt&amp;amp;gt;''' and '''&amp;amp;lt;tt&amp;amp;gt;getMax&amp;amp;lt;/tt&amp;amp;gt;''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''&amp;amp;lt;tt&amp;amp;gt;getMax&amp;amp;lt;/tt&amp;amp;gt;''' method but it does exist.) Bug reported here 21 April 2005.&lt;br /&gt;
&lt;br /&gt;
Fixes:&lt;br /&gt;
&lt;br /&gt;
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):&lt;br /&gt;
&lt;br /&gt;
  http://www.santafe.edu/~mgd/javaswarm.dll&lt;br /&gt;
  http://www.santafe.edu/~mgd/cygswarm-0.dll&lt;br /&gt;
&lt;br /&gt;
These would overwrite the equivalent files in the Java/Swarm binary distribution.&lt;br /&gt;
The &amp;amp;lt;tt&amp;amp;gt;cygswarm-0.dll&amp;amp;lt;/tt&amp;amp;gt; goes in &amp;amp;lt;tt&amp;amp;gt;Cygwin/bin&amp;amp;lt;/tt&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.&lt;br /&gt;
&lt;br /&gt;
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]),  or simply fix the offending line of code:&lt;br /&gt;
&lt;br /&gt;
In &amp;amp;lt;tt&amp;amp;gt;Averager.m&amp;amp;lt;/tt&amp;amp;gt;, change line 106 from &lt;br /&gt;
  '''if (totalCount == 0)''' &lt;br /&gt;
to &lt;br /&gt;
 '''if (totalCount == 0 || count == 0)'''&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Main_Page&amp;diff=34</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Main_Page&amp;diff=34"/>
				<updated>2015-10-06T14:59:38Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: /* WWW.SWARM.ORG is back! */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Swarm_and_MinGW]]&lt;br /&gt;
&lt;br /&gt;
[[ABM_Resources]]&lt;br /&gt;
&lt;br /&gt;
[[Swarm_Apps]]&lt;br /&gt;
&lt;br /&gt;
[[Swarm_FAQ]]&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
=WWW.SWARM.ORG is back!=&lt;br /&gt;
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
&lt;br /&gt;
=News=&lt;br /&gt;
==Announcement for Swarmfest 2012==&lt;br /&gt;
&lt;br /&gt;
Email Inquiries to: swarmfest2012@gmail.com&lt;br /&gt;
&lt;br /&gt;
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems&lt;br /&gt;
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.&lt;br /&gt;
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking&lt;br /&gt;
&lt;br /&gt;
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''&lt;br /&gt;
 &lt;br /&gt;
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling.  Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists.  Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.&lt;br /&gt;
&lt;br /&gt;
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the &amp;amp;quot;next&amp;amp;quot; generation of ABM tools, platforms and application.&lt;br /&gt;
&lt;br /&gt;
Watch this page for upcoming news on program and logistics.&lt;br /&gt;
&lt;br /&gt;
Hope to see you in Charlotte!&lt;br /&gt;
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=New version of Objective-C Swarm for Windows=&lt;br /&gt;
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:&lt;br /&gt;
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.&lt;br /&gt;
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.&lt;br /&gt;
* Faster execution than Cygwin Swarm.&lt;br /&gt;
See the yellow &amp;amp;quot;Swarm Software&amp;amp;quot; box on this page.&lt;br /&gt;
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}&lt;br /&gt;
&lt;br /&gt;
=Be a Swarm Development Group Member!=&lt;br /&gt;
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;div style=&amp;amp;quot;float:right;&amp;amp;quot;&amp;amp;gt;'''[[News|News archive]]&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''&amp;amp;lt;/div&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;amp;quot;45%&amp;amp;quot; style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd&amp;amp;quot; |&lt;br /&gt;
=Agent- and Individual-based Modeling Resources=&lt;br /&gt;
&lt;br /&gt;
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:&lt;br /&gt;
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference&lt;br /&gt;
**Software (information on alternative platforms; learning materials; template models; integrated development environments)&lt;br /&gt;
**&amp;amp;quot;How and why to do agent-based modeling&amp;amp;quot;: techniques and theory&lt;br /&gt;
**Resources specific to different scientific domains&lt;br /&gt;
&lt;br /&gt;
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC&amp;amp;quot; |&lt;br /&gt;
&lt;br /&gt;
[[Image:Small-swarm-logo.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Swarm Software for Agent-based Modeling=&lt;br /&gt;
&lt;br /&gt;
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications&lt;br /&gt;
&lt;br /&gt;
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]&lt;br /&gt;
&lt;br /&gt;
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C&lt;br /&gt;
&lt;br /&gt;
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA&amp;amp;quot; |&lt;br /&gt;
=Swarm Development Group=&lt;br /&gt;
&lt;br /&gt;
*'''[[Swarm Development Group]] (SDG)'''&lt;br /&gt;
&lt;br /&gt;
*'''[[SDG contact|Contact information]]'''&lt;br /&gt;
&lt;br /&gt;
*'''[[SDG_membership|Information on SDG membership]]'''&lt;br /&gt;
&lt;br /&gt;
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2 style=&amp;amp;quot;border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3&amp;amp;quot; |&lt;br /&gt;
=Help=&lt;br /&gt;
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]&lt;br /&gt;
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?&lt;br /&gt;
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help&lt;br /&gt;
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing&lt;br /&gt;
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]&lt;br /&gt;
* [[SwarmWiki:Help]] Help page for wiki administrators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=Main_Page&amp;diff=32</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=Main_Page&amp;diff=32"/>
				<updated>2015-10-05T21:27:45Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
[[Swarm_and_MinGW]]&lt;br /&gt;
&lt;br /&gt;
[[ABM_Resources]]&lt;br /&gt;
&lt;br /&gt;
[[Swarm_Apps]]&lt;br /&gt;
&lt;br /&gt;
[[Swarm_FAQ]]&lt;br /&gt;
&lt;br /&gt;
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
=WWW.SWARM.ORG is back!=&lt;br /&gt;
We have just restored the Swarm Development Group wiki, following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.&lt;br /&gt;
&lt;br /&gt;
= Getting started =&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]&lt;br /&gt;
&lt;br /&gt;
=News=&lt;br /&gt;
==Announcement for Swarmfest 2012==&lt;br /&gt;
&lt;br /&gt;
Email Inquiries to: swarmfest2012@gmail.com&lt;br /&gt;
&lt;br /&gt;
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems&lt;br /&gt;
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.&lt;br /&gt;
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking&lt;br /&gt;
&lt;br /&gt;
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''&lt;br /&gt;
 &lt;br /&gt;
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling.  Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists.  Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.&lt;br /&gt;
&lt;br /&gt;
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the &amp;amp;quot;next&amp;amp;quot; generation of ABM tools, platforms and application.&lt;br /&gt;
&lt;br /&gt;
Watch this page for upcoming news on program and logistics.&lt;br /&gt;
&lt;br /&gt;
Hope to see you in Charlotte!&lt;br /&gt;
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=New version of Objective-C Swarm for Windows=&lt;br /&gt;
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:&lt;br /&gt;
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.&lt;br /&gt;
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.&lt;br /&gt;
* Faster execution than Cygwin Swarm.&lt;br /&gt;
See the yellow &amp;amp;quot;Swarm Software&amp;amp;quot; box on this page.&lt;br /&gt;
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}&lt;br /&gt;
&lt;br /&gt;
=Be a Swarm Development Group Member!=&lt;br /&gt;
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;div style=&amp;amp;quot;float:right;&amp;amp;quot;&amp;amp;gt;'''[[News|News archive]]&amp;amp;lt;br&amp;amp;gt;&lt;br /&gt;
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''&amp;amp;lt;/div&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| width=&amp;amp;quot;45%&amp;amp;quot; style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd&amp;amp;quot; |&lt;br /&gt;
=Agent- and Individual-based Modeling Resources=&lt;br /&gt;
&lt;br /&gt;
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:&lt;br /&gt;
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference&lt;br /&gt;
**Software (information on alternative platforms; learning materials; template models; integrated development environments)&lt;br /&gt;
**&amp;amp;quot;How and why to do agent-based modeling&amp;amp;quot;: techniques and theory&lt;br /&gt;
**Resources specific to different scientific domains&lt;br /&gt;
&lt;br /&gt;
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC&amp;amp;quot; |&lt;br /&gt;
&lt;br /&gt;
[[Image:Small-swarm-logo.jpeg]]&lt;br /&gt;
&lt;br /&gt;
=Swarm Software for Agent-based Modeling=&lt;br /&gt;
&lt;br /&gt;
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications&lt;br /&gt;
&lt;br /&gt;
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]&lt;br /&gt;
&lt;br /&gt;
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C&lt;br /&gt;
&lt;br /&gt;
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;amp;quot;border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA&amp;amp;quot; |&lt;br /&gt;
=Swarm Development Group=&lt;br /&gt;
&lt;br /&gt;
*'''[[Swarm Development Group]] (SDG)'''&lt;br /&gt;
&lt;br /&gt;
*'''[[SDG contact|Contact information]]'''&lt;br /&gt;
&lt;br /&gt;
*'''[[SDG_membership|Information on SDG membership]]'''&lt;br /&gt;
&lt;br /&gt;
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=2 style=&amp;amp;quot;border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3&amp;amp;quot; |&lt;br /&gt;
=Help=&lt;br /&gt;
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]&lt;br /&gt;
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?&lt;br /&gt;
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help&lt;br /&gt;
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing&lt;br /&gt;
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]&lt;br /&gt;
* [[SwarmWiki:Help]] Help page for wiki administrators.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	<entry>
		<id>http://www.swarm.org/w/index.php?title=File:Frogs_2015-02-4_view.png&amp;diff=31</id>
		<title>File:Frogs 2015-02-4 view.png</title>
		<link rel="alternate" type="text/html" href="http://www.swarm.org/w/index.php?title=File:Frogs_2015-02-4_view.png&amp;diff=31"/>
				<updated>2015-10-05T21:15:47Z</updated>
		
		<summary type="html">&lt;p&gt;Railsback: Test file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Test file&lt;/div&gt;</summary>
		<author><name>Railsback</name></author>	</entry>

	</feed>