[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-GnuCOBOL] Bug-GnuCOBOL Digest, Vol 17, Issue 5

From: James K. Lowden
Subject: Re: [Bug-GnuCOBOL] Bug-GnuCOBOL Digest, Vol 17, Issue 5
Date: Fri, 6 Jul 2018 19:45:24 -0400

On Wed, 4 Jul 2018 22:40:44 -0400
Michael Potter <address@hidden> wrote:

> This is what I used as a prototype for what I will do in production.
> Note how I put the FUNCTION .so file in a different directory.
> The key to getting it to compile is the REPOSITORY section in foo.cbl.
> The key to getting it to run is pointing to that directory using

It should be possible to make FUNCTION.so available without using
COB_LIBRARY_PATH if you build the compiler yourself and don't mind
using a fixed directory.  

On most Linux systems, the shared object in loaded by ld.so, and the
default search path usually includes /usr/lib.  With the file in 


I would expect it to work without COB_LIBRARY_PATH.  

If you don't like to put your Cobol functions in the system library
path, RPATH is your friend.  You might for instance use 


To use that, RPATH is your friend.  When compiling the compiler, use 

        export LDFLAGS="-Wl,-rpath -Wl,$cobol_functions"

I'm happy to experiment with a working example.  :-)  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]