Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Linker flag -U in cob32 or cob64

$
0
0

Thank you, Yvon

You gave me a very good example and use case for linker -U flag.

Have you ever encounter the following issue:

My source code is as simple as yours: (COB64.cbl)

     ....

      procedure division.

          DISPLAY "HELLO WORLD".

          DISPLAY "Press <CR> to terminate."

          STOP ' '.

          goback.

      ...

$cob64 -g -x -t -oCOB64 COB64.o

./COB64

HELLO WORLD

Press <CR> to terminate.

But if  I do this

$ cob64 -g -x -t -oCOB64 COB64.o -U

Cobol program "socket" undefined. Assuming it will be dynamically loaded.

Cobol program "pthread_mutex_destroy" undefined. Assuming it will be dynamically loaded.

Cobol program "__strdup" undefined. Assuming it will be dynamically loaded.

Cobol program "sigemptyset" undefined. Assuming it will be dynamically loaded.

Cobol program "read" undefined. Assuming it will be dynamically loaded.

Cobol program "getcwd" undefined. Assuming it will be dynamically loaded.

Cobol program "strxfrm" undefined. Assuming it will be dynamically loaded.

Cobol program "tan" undefined. Assuming it will be dynamically loaded.

Cobol program "fread" undefined. Assuming it will be dynamically loaded.

Cobol program "getpwuid" undefined. Assuming it will be dynamically loaded.

Cobol program "rmdir" undefined. Assuming it will be dynamically loaded.

Cobol program "pthread_mutexattr_init" undefined. Assuming it will be dynamically loaded.

Cobol program "__strtod_internal" undefined. Assuming it will be dynamically loaded.

Cobol program "vfprintf" undefined. Assuming it will be dynamically loaded.

Cobol program "iconv_open" undefined. Assuming it will be dynamically loaded.

Cobol program "setenv" undefined. Assuming it will be dynamically loaded.

....

....

$ ./COB64

Segmentation fault (core dumped)

linker flag -U makes  all standard C functions  as external loadable COBOL function.  when I run it. the application crashed.

Without -U,  everything runs fine.

Did I miss any COBOL library,  CopyBooks?  

Really appreciated.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>