Linking Issues

A number of problems can arise when linking C libraries with Clipper.
It is easy to link the C library ahead of the Clipper libraries,
effectively replacing the Clipper functions with their C
counterparts. The most common mistake with RTLink is believing that
the automatic search request generated by Clipper will cause Clipper
to be linked in before any libraries included on the link line.
This is not the case. The following link line, for example, will
cause LLIBCA to be linked in ahead of Clipper's libraries.

RTLINK FI Foo, Cstuff LIB LLIBCA

This will produce duplicate symbol warnings that should not be
ignored. The reason for this is that the libraries included in the
link line are searched before the Clipper generated automatic search
request. This can be fixed be either of the following methods.
First, you can link using a PLL such as BASE50.PLL because the PLL is
always resolved first - before libraries and even OBJs. Secondly,
you can simply include the Clipper libraries on the link line ahead
of any C libraries, like the following example.

RTLINK FI Foo, Cstuff LIB CLIPPER, LLIBCA /NOE

This link line correctly links the Clipper run-time support routines
instead of the C library versions. The /NOE switch prevents an
extended search of the C library. Without this you will get a
duplicate symbol warning on the symbol __cflcvt_tab when Clipper and
LLIBCA both try to bring in this same function.