First retrieve the source code by clicking here.
Extract the contents of the downloaded source code to your desired location. Change directory to the selected location.
[codesyntax lang=”bash”]
./configure CPPFLAGS=-I/usr/local/BerkeleyDB.5.3/include -/usr/local/BerkeleyDB.5.3/lib make -j4 sudo make install
[/codesyntax]
Next check the version of cobc by issuing the following command.
[codesyntax lang=”bash”]
cobc -v
[/codesyntax]
The resulting output should reflect the following.
[codesyntax lang=”bash”]
cobc (GnuCOBOL) 3.1-rc1.0 Built Sep 12 2020 13:29:26 Packaged Jul 01 2020 00:39:38 UTC C version "10.2.0" loading standard configuration file 'default.conf' cobc: error: no input files
[/codesyntax]
Install the OpenCOBOLIDE by clicking here.
Invoke the GnuCobol IDE by issuing the following command.
[codesyntax lang=”bash”]
python3 /usr/bin/opencobolide
[/codesyntax]
Check the versions reflected in the About option of the IDE.
[codesyntax lang=”text”]
cobc --info ============ cobc (GnuCOBOL) 3.1-rc1.0 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart Built Sep 12 2020 13:29:26 Packaged Jul 01 2020 00:39:38 UTC C version "10.2.0" build information build environment : x86_64-pc-linux-gnu CC : gcc C version : "10.2.0" CPPFLAGS : CFLAGS : -O2 -pipe -finline-functions -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -U_FORTIFY_SOURCE LD : /usr/bin/ld -m elf_x86_64 LDFLAGS : -Wl,-z,relro,-z,now,-O1 GnuCOBOL information COB_CC : gcc COB_CFLAGS : -I/usr/local/include -Wno-unused -fsigned-char -Wno-pointer-sign -pipe COB_LDFLAGS : COB_LIBS : -L/usr/local/lib -lcob -lm COB_CONFIG_DIR : /usr/local/share/gnucobol/config COB_COPY_DIR : /usr/local/share/gnucobol/copy COB_MSG_FORMAT : GCC COB_OBJECT_EXT : o COB_MODULE_EXT : so COB_EXE_EXT : 64bit-mode : yes BINARY-C-LONG : 8 bytes endianness : little-endian native EBCDIC : no extended screen I/O : ncursesw variable file format : 0 sequential file handler : built-in ISAM file handler : BDB mathematical library : GMP XML library : libxml2 JSON library : disabled cobcrun --runtime-env ===================== command "cobcrun --runtime-env" failed with exit code 1. Note that this command is supported only by recent builds of GnuCOBOL Process output: /usr/local/bin/cobcrun: unrecognized option '--runtime-env'
[/codesyntax]
By using these commands the GnuCOBOL compiler can be upgraded to the latest version.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.