Packages for Windows

You have a number of items on the menu to choose from. The first two are self-extracting executables that provide standalone support for GnuCOBOL and the debugger without requiring the MSYS2 environment. The other two provide support for the 32-bit and 64-bit versions of the MSYS2 Linux-like environment for Windows.

Standalone GnuCOBOL-3.2 plus CBL-GDB for Windows.

The self-extracting executables each create a standalone directory that includes the GnuCOBOL compiler and the CBL-GDB debugging extensions.

Some versions of anti-virus protection prevent the self-extracting installer executable from running. Temporarily disabling the anti-virus protection has been known to allow the installation to proceeed.

Users with 7-zip installed on their computers can right-click the .exe and use 7-zip to extract the gnucobol32 or gnucobol64 folder.

Alternatively, you can download the gnucobol32 or gnucobol64 folders as .ZIP files from the following links.

Choosing a version

On a 32-bit Windows installation, you have no choice: Only the 32-bit version will work on your system.

The two versions can coexist on a 64-bit Windows installation. You can install either, or both. The only real selection criterion about which to use has to do with what libraries you might want to access from your COBOL code, and whether they have 32-bit or 64-bit interfaces. If that doesn’t mean much to you, then just install the one that matches your system; these days, that’s most likely the 64-bit version.

When launched, the self-extractor will ask you where you want the executables installed. It will offer to modify your environment for ease of use of the package. If you turn down that offer, it will tell you the location of the batch file you’ll need to run to set up the environment on a per-session basis.

Note that if you install both packages, you can set up permanent environment variables for at most one of them.

If you don’t set up permanent environment variables, the compiler is made useable by issuing one of these commands:

c:\gnucobol64\bin\cobenv.cmd
c:\gnucobol32\bin\cobenv.cmd

Usage

The GnuCOBOL User’s Guide explains the normal use of cobc and the libraries.

The COBOLworx walkthrough of the debugging package explains the use of the CBL-GDB debugging extensions.

CBL-GDB for the MSYS2 environment in Windows.

The you can choose from are CBL-GDB installation packages for the MSYS2 environment:

After downloading a .zst package, and while running in the MSYS2 environment, use pacman -U <filename>.zst to install it. Doing so will install the CBL-GDB binary files into either /mingw32/bin or /mingw64/bin

By themselves, those packages can’t do anything useful; you have to have GnuCOBOL installed as well, so that you can compile something for the CBL-GDB debugger to debug. The packages do specify GnuCOBOL as a prerequisite requirement, and pacman will try to find them. If for some reason pacman isn’t able to find them, the 32-bit and 64-bit packages can be downloaded from msys2.org

This is one of those deals where if you don’t know what it means, you don’t need it. Once you become familiar with MSYS2, it will make more sense. But, in general, if you are a Windows user who wants to be able to compile COBOL programs, one of the self-extractors (or the matching .zip file) is what you want.