Linking Open C API Programs


 
The uflink macro is supplied with the Open C API product on non-Windows platforms to assist the user in linking Open C API programs. Help for the uflink macro can be obtained by entering the command "uflink -h". The format of the uflink command is:
 
$ uflink [-h]
 
or
 
$ uflink [-L] [-p] [-v] [-C] [-r] [-d] [-m] [-f] <mainline> [<sub1> <sub2> ...] [<user_lib1> ...]
 
Where:
 
-L pass the following argument through to the linker
 
-p Link a Open C++ image. This will include the proper Open C++ libraries in the link. -r may be used with this option.
 
-C link a C++ image. -r May be used with this option.
 
-r produce a shared library. This switch should be used for Internal Open C API programs only. Programs built using the -r switch will not run externally. This option will produce a file named <mainline>.so on Linux systems and <mainliine>.dylib on MacOS systems.
 
-d links the user program with run time debugging support (e.g. the -g switch on cc).
 
-m switch causes the loader (ld(1)) to produce a map of libraries and object files used in the link (see the -m switch to ld).
 
<mainline> is the name of the resulting executable. Uflink looks for the user's main routine in the file <mainline>.o.
 
<subn> are user supplied subroutines (".o" files).
 
<user_libn> are user supplied archives (".a" files).
 
An example command line might be:
 
uflink -m prog1 subroutine_a.o subroutine_b.o subroutine_c.o lib1.a
 
Uflink may also run interactively. Typing "uflink" without command line switches causes the script to prompt the user for input. NOTE: The first routine does not require the ".o" file extension; the routines that follow the first routine require the ".o" extension.