Error running Hello World

0 votes
asked by about OpenCobolIDE

I have 2 versions of the Hello World program :
1 :
******************************************************************
* Author:
* Date:
* Purpose:
* Tectonics: cobc
******************************************************************
IDENTIFICATION DIVISION.
------------------
PROGRAM-ID. HELLOW.
ENVIRONMENT DIVISION.
------------------
CONFIGURATION SECTION.
-----------------------
INPUT-OUTPUT SECTION.
*-----------------------
DATA DIVISION.
*-
-----------------
FILE SECTION.
-----------------------
WORKING-STORAGE SECTION.
*-----------------------
PROCEDURE DIVISION.
*-
-----------------
MAIN-PROCEDURE.
**
* The main procedure of the program
**
DISPLAY "Hello world"
STOP RUN.
** add other procedures here
END PROGRAM HELLOW.


  1. ******************************************************************

    • Author:
    • Date:
    • Purpose:
    • Tectonics: cobc
      ******************************************************************
      IDENTIFICATION DIVISION.
      PROGRAM-ID. YOUR-PROGRAM-NAME.
      DATA DIVISION.
      FILE SECTION.
      WORKING-STORAGE SECTION.
      PROCEDURE DIVISION.
      MAIN-PROCEDURE.
      DISPLAY "Hello world"
      STOP RUN.
      END PROGRAM YOUR-PROGRAM-NAME.

Version 1 runs without problems, but I got this error while running version 2 :
D:\Gnuproject\bin\LAB2.exe
libcob: error: version mismatch
note: LAB2.cbl has version 2.0.0
note: libcob has version 3.1.2.0

Process finished with exit code 1

What can be the problem?
Thank you and best regards,
Tommy

1 Answer

0 votes
No avatar answered by (92.2k points)

The error message suggests a version mismatch between the program "LAB2.cbl" and the Cobol compiler "libcob". The LAB2.cbl file has version 2.0.0, while the libcob version is 3.1.2.0. To resolve this issue, you may need to ensure that the versions of both the program and the compiler are compatible. Updating either the program or the compiler to a compatible version should resolve the error.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...