Re: compile+link Fujitsu Linux
- From: Richard <riplin@xxxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 20:44:48 -0800 (PST)
On Jan 31, 12:00 pm, charles.good...@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 tried that and it worked fine on my machine.
All it seems to need is the directory where the .so is located to be
on the LS_LIBRARY_PATH
Either add this to the LD_LIBRARY_PATH (eg:
LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
MYMAIN
or put the .so into one of the directories in that list.
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.
I have no problem on Mandrake.
.
- References:
- compile+link Fujitsu Linux
- From: charles . goodman
- compile+link Fujitsu Linux
- Prev by Date: Re: Mapping (CoBOL) Methodologies to Problem Domains
- Next by Date: Re: compile+link Fujitsu Linux
- Previous by thread: Re: compile+link Fujitsu Linux
- Next by thread: Re: compile+link Fujitsu Linux
- Index(es):
Relevant Pages
|