Argonne National Laboratory

Experimental Physics and
Industrial Control System

Windows Information

This page provides a repository for information about building EPICS on Microsoft Windows. If there are any mistakes here, or you find any other information that ought to go on this page, please let me know.

Build tools

EPICS can be built on Windows using the MinGW version of GNU Make, either ActiveState Perl or Strawberry Perl, and your choice of MinGW GCC, Microsoft's Visual Studio C++ compiler (including the free Community Edition). There is support in EPICS for using Cygwin, but the performance is significantly worse than any of the other options so we don't recommend it any more.

C/C++ Compilers (targets windows-x64, windows-x64-mingw, win32-x86, win32-x86-mingw)

Download and install one of these compilers:

  • Microsoft Visual Studio, any Edition. When installing, make sure you check the box for Programming Languages/VC++.
  • Strawberry Perl comes with both MinGW's GCC and GNU Make. Set your EPICS_HOST_ARCH variable to windows-x64-mingw or win32-x86-mingw to build EPICS using the GCC that comes with this.

Other Build Tools

In addition to the compiler, you will also need the following free tools:

  • Perl: I recommend Strawberry Perl which includes both GCC and GNU Make, but ActiveState Perl will also work.
  • GNU Make: If you're using a recent copy of Strawberry Perl the latest versions already come with a suitable version of GNU Make included, named gmake.exe.

    If you're using ActiveState or an older Perl installation, you will need to install a recent version of GNU Make:

    The above version supports make -jn for parallel builds. GNU Make version 4.2.1 runs better than version 4.1 that I previously recommended, and doesn't hang up under load.

    Note that GNU Make will not work properly if you install it into a directory that has parentheses () in its path, and it's possible that having spaces in the path might be a problem too. DO NOT install it under the C:\Program Files (x86)\ or C:\Program Files\ directories. I suggest creating a directory like C:\GNU\bin for these kinds of tools.

  • To extract the files from the EPICS Base tarfile on a Windows system, you may also need a copy of WinZip, 7-zip or another equivalent program.

After extracting the EPICS Base source code, look in the base/startup directory for the win32.bat file which you can edit to help you set up the necessary path and environment variables for building base.

If you wish to cross-compile for a vxWorks target you will obviously need to have Wind River's Tornado or WorkBench software installed, and to edit the base/configure/os/CONFIG_SITE.Common.vxWorksCommon file.

Deprecated: Cygwin (targets cygwin-x86, cygwin-x86_64)

Download and run the 32-bit Cygwin Installer (you can use the 64-bit Cygwin Installer but you will have to create your own configuration files for the cygwin-x86_64 target on older versions of Base). When installing Cygwin to use with GCC, you may set the "Default Text File Type" to be either Unix or DOS depending on whether you expect to use other Windows-specific tools with this installation or not.

Note: Some Cygwin versions may not successfully build some EPICS Base versions, although it may still be possible if you to configure Base to create a statically linked version.

You will need to select at least the following Cygwin packages for installation (plus their atomatic dependencies):

  • gcc-core
  • gcc-g++
  • make
  • perl

The installer will add extra packages on which the above depend automatically. In addition to the above, the following packages are useful to have:

  • gdb
  • openssh
  • readline
  • vim

After the packages have been installed, use the cygwin tar program to extract the EPICS Base sourcce code. If you didn't install the readline package edit the file configure/os/CONFIG_SITE.Common.cygwin-x86 and comment out the COMMANDLINE_LIBRARY setting. At this point the only thing you need to do to build Base is to open a Cygwin bash shell window, set EPICS_HOST_ARCH and run make in the top level directory of Base:

$ export EPICS_HOST_ARCH=cygwin-x86
$ cd epics/base
$ make
...
ANJ, 04 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·