Friday, October 22, 2021

Running GNU COBOL programs from a flash drive

 There are a few requirements to move your CYGWIN compiled COBOL programs to a flash drive for running on a different computer. Why would you want to do that? 

You may have a production machine the programs are targeted for that you do not want to include the source files.

The easiest way to get setup using a USB Drive is to have CYGWIN already installed on the machine and add the GNU Cobol DLL to the path.

Create a portable CYGWIN USB using these instructions for CygwinPortable.

https://github.com/GathSystems/CygwinPortable

2 Required Files to run GNU Cobol from a flash Drive can be found in these locations.

 cygwin1.dll (CYGWIN DLL)

Newer Installations Path:

D:\cygwin64\usr\i686-pc-cygwin\sys-root\usr\bin\cygwin1.dll

Older path:

E:\cygwin64\usr\i686-pc-cygwin\sys-root\usr\bin\cygwin1.dll

Newer Path:

E:\cygwin64\bin\cygwin1.dll

cygcob-4.dll (GNU COBOL DLL)

Packaged path:

gnu-cobol-2.0_nightly_r658.tar\gnu-cobol-2.0_nightly_r658\gnu-cobol-2.0\libcob\.libs\cygcob-4.dll

Installed Path:

E:\cygwin64\usr\local\bin\cygcob-4.dll

Once you have included the 2 DLL files with your program files you should be able to add the path to the targeted system and run your program.