Hi,
I have the next program:
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>cat main.cbl
IDENTIFICATION DIVISION.
PROGRAM-ID. MAIN.
WORKING-STORAGE SECTION.
01 STR-GOODBYE-WORLD.
05 FILLER PIC X(32) VALUE 'GOODBYE-WORLD'.
PROCEDURE DIVISION.
DISPLAY 'Entrada al programa principal...'.
CALL "HELLO-WORLD".
CALL STR-GOODBYE-WORLD.
STOP RUN.
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>cat helloworld.cbl
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello world!'.
EXIT PROGRAM.
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>cat goodbyeworld.cbl
IDENTIFICATION DIVISION.
PROGRAM-ID. GOODBYE-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Goodbye world!'.
EXIT PROGRAM.
I create a static library with helloworld.o and goodbyeworld.o objects.
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>ar -tvf libregards.a
rw-rw-r-- 176/110 2156 Aug 1 08:38 2022 helloworld.o
rw-rw-r-- 176/110 2184 Aug 1 08:39 2022 goodbyeworld.o
I link the executable regards linking main object and static library libregards.a:
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>cat build_regards_exec_linking_static_library.sh
# Set COBMODE to 64 for 64bit. Defaults to 32bit.
MODE=${COBMODE:-32}
cob$MODE -v -xU -o regards main.o -L . -lregards
If a run regards program fail with error
int-cob-d-01u:/cralm/simep/prue/apps/helloworldv3>regards
Entrada al programa principal...
Hello world!
Load error : file 'GOODBYE-WORLD'
error code: 173, pc=0, call=1, seg=0
173 Called program file not found in drive/directory
How do I have to link the program so that it includes all the objects contained in the static library even the ones not implicitly referenced?
Thanks.
Regards.
Error 173 - Called program file not found in drive/directory when I call a routine in a static library
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.






