# ws3270 Build Instructions

ws3270 is built on Windows using the MinGW tools under Cygwin. For more information about MinGW, visit the MinGW webpage. For more information about Cygwin, visit the Cygwin webpage.

The minimum set of Cygwin packages needed to build ws3270 are:

- The default set (bash, etc.)
- The make package from the Devel group.
- The gcc-core package from the Devel group.

[optional] If you want SSL support, you will need to build a MinGW OpenSSL library. That requres the following packages:

- The openssl package from the Net group. Note that you want the source for openssl, not just the binaries.
- The perl package from the Interpreters group.

[optional] To build and install the OpenSSL library, use the following Cygwin shell commands:

       cd /usr/src/openssl-*
       ./Configure --prefix=/usr/local/mingw-openssl mingw
       make
       make install

To build ws3270 (with or without SSL support), start a Cygwin shell, cd to the directory where the source code resides, and type:

       make

ws3270 was developed primarily on 32-bit Windows XP, but should be buildable on Windows Server 2003 or Windows 2000 (though Windows 2000 has been known to build defective ws3270 DLLs). It has not been built on 64-bit Windows or on Windows Vista.

The source tarball also includes an .iss file for use with Inno Setup. This is used to construct the install executable. See the Inno Setup webpage for details.

ws3270 can also be built on Linux, using the MinGW cross-compiler. (This is how public releases of ws3270 are built.) The precise method for building a cross-compiler varies with gcc, Binutils and MinGW releases, but this link should get you started.

## Using Microsoft Tools

To build ws3270 using Microsoft Visual C++, start a Command Prompt window. At the command prompt, 'cd' to the ws3270 source directory, and type:

       nmake /f Msc\Makefile

This will build `ws3270.exe` and the DLLs and utilities needed to install and run it.

Note that the resulting version of ws3270 will not include SSL support. To build ws3270 with a statically-linked OpenSSL library, you must modify `Msc\Makefile`; instructions for doing that are included in the file.