gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] How to compile the translated code using GCC?


From: henry wang
Subject: [open-cobol-list] How to compile the translated code using GCC?
Date: Wed Nov 16 13:36:03 2005

Hi Gentlemen,
 
Everyone knows "OpenCOBOL translates COBOL into C and compiles the translated code using GCC."
But my test of compiling the translated code (hello.c) using GCC failed.
Probably the desired options were not set?
Could you give me a tip about how to compile it using GCC?
      
The simple  was use:
---------------------   hello.cob  ------------------------
       IDENTIFICATION DIVISION.
       PROGRAM-ID. hello.
       ENVIRONMENT DIVISION. 
        PROCEDURE DIVISION.
            DISPLAY "Hello, OpenCOBOL!".
-------------------------------------------------------------
commands carried out:
$ cobc hello.cob -C -fixed -fmain
(The hello.c was correctly generated.)
$ gcc hello.c
errors occurred:
../Temp/ccjtf8sE.o:hello.c:(.text+0x7e): undefined reference to `_cob_init'
../Temp/ccjtf8sE.o:hello.c:(.text+0x8b): undefined reference to `_cob_stop_run'
../Temp/ccjtf8sE.o:hello.c:(.text+0xad): undefined reference to `_cob_current_module'
and so on.
 
Best regards,
Henry
 


Yahoo! FareChase - Search multiple travel sites in one click.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]