Re: compile+link Fujitsu Linux
- From: Robert <no@xxxxxx>
- Date: Wed, 30 Jan 2008 21:38:54 -0600
On Wed, 30 Jan 2008 15:00:14 -0800 (PST), charles.goodman@xxxxxxx wrote:
I am evaluating Fujitsu NetCOBOL for Linux.
I am having problems getting CALL/CANCEL to work.
Here are two simple programs, first the main program then the called
program:
IDENTIFICATION DIVISION.
PROGRAM-ID. MYMAIN.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ACPT PIC X.
PROCEDURE DIVISION.
OPEN-PARA.
DISPLAY "BEGIN MYMAIN".
CALL 'MYSUB1'.
DISPLAY "THE END - ACCEPTING ONE BYTE".
ACCEPT ACPT.
STOP RUN.
IDENTIFICATION DIVISION.
PROGRAM-ID. MYSUB1.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ACPT PIC X.
PROCEDURE DIVISION.
OPEN-PARA.
DISPLAY "BEGIN MYSUB1 - ACCEPTING ONE BYTE".
ACCEPT ACPT.
EXIT PROGRAM.
The two source programs are saved as MYMAIN.CBL and MYSUB1.CBL.
We want dynamic linkage since our real application consists of dozens
of C programs and hundreds of COBOL programs.
I tried compiling with:
cobol -M -dy -WC,"BINARY(BYTE),DLOAD" -o MYMAIN MYMAIN.CBL
cobol -dy -shared -WC,"BINARY(BYTE)" -o libMYSUB1.so MYSUB1.CBL
when I try to execute I see my first DISPLAY and then it crashes:
BEGIN MYMAIN
cobol-rts:: HALT: JMP0015I-U [PID:0000763D TID:002516C0] CANNOT CALL
PROGRAM 'MY
SUB1'. ./MYMAIN: undefined symbol: MYSUB1 PGM=MYMAIN
Aborted
I am running on Red Hat Enterprise, and Fujitsu support say they will
only support:
* Red Hat Linux 7.2, Locale C
* Red Hat Linux 7.3, Locale C
* Red Hat Linux Advanced Server 2.1, Locale C
I am hoping that someone here has figured out how to compile and line
on less ancient versions of Linux.
Try '-l MYSUB1' (lower case el) on the compilation of MYMAIN. As written, MYMAIN has no
way of knowing the library name. Also, make sure your current directory is in
LD_LIBRARY_PATH, either as .: or explicitly.
.
- Follow-Ups:
- Re: compile+link Fujitsu Linux
- From: Richard
- Re: compile+link Fujitsu Linux
- References:
- compile+link Fujitsu Linux
- From: charles . goodman
- compile+link Fujitsu Linux
- Prev by Date: Re: Web Cobol - Tool for web develop with AcuCobol
- Next by Date: Re: OT: Racial superiority / Intelligent design was Re: OT:Thanksgiving
- Previous by thread: compile+link Fujitsu Linux
- Next by thread: Re: compile+link Fujitsu Linux
- Index(es):
Relevant Pages
|