Re: compile+link Fujitsu Linux
- From: Robert <no@xxxxxx>
- Date: Thu, 31 Jan 2008 21:33:48 -0600
On Thu, 31 Jan 2008 09:48:48 -0800 (PST), charles.goodman@xxxxxxx wrote:
Thanks for the tips.
Yes I needed to add my curent directory to LD_LIBRARY_PATH
I also nneded to add "-L./" to the cobol command to compile the main
program.
-L is used to override the user's LD_LIBRARY_PATH. It shouldn't be necessary on your own
machine.
My compile commands, that work are:
cobol -dy -shared -WC,"BINARY(BYTE)" -o libMYSUB1.so MYSUB1.cbl
cobol -dy -shared -WC,"BINARY(BYTE)" -o libMYSUB2.so MYSUB2.cbl
cobol -M -dy -WC,"BINARY(BYTE),DLOAD" -o MYMAIN -L./ -lMYSUB1 -lMYSUB2
MYMAIN.cbl
I am able to compile and execute. My simple programs are designed to
allow me to see the functioning of CALL and CANCEL.....
However the results is NOT exactly what I want. Using -l does not
allow for proper functioning of the CANCEL verb (see pg 77 of user's
guide). Once a subprogram is loaded with a CALL statement, it remains
in memory regardless of CANCEL statements. The working-storage of the
sub-program is not reinitialized upon a second CALL.
I answered Richard before reading this reply. Failure of the CANCEL means Fujitsu figured
out the library (.so) had not been dynamically loaded, so did not issue a dlclose(). If
you want the program initialized every time, use the INITIAL clause on PROGRAM-ID.
See my comments to Richard about the disadvantage of hundreds of little libraries.
.
- Follow-Ups:
- Re: compile+link Fujitsu Linux
- From: Richard
- Re: compile+link Fujitsu Linux
- Prev by Date: Re: compile+link Fujitsu Linux
- Next by Date: Re: help with tables
- Previous by thread: Re: compile+link Fujitsu Linux
- Next by thread: Re: compile+link Fujitsu Linux
- Index(es):
Relevant Pages
|