Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - linking http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LINKING

 ClipOn is compatible with all major linkers.  The following is a
 list of tested linkers and their version numbers.

 MS LINK v3.65, v3.69        - Microsoft Corporation
 Turbo Link v1.0             - Borland International (only with Clipper '87)
 PLINK86plus v2.24           - Phoenix Technologies Ltd.
 .RTLink v3.10, v3.11, v3.13 - PocketSoft, Inc.
 BLINKER v1.1, v1.3, v1.5    - Blink, Inc.

 Other linkers and linker versions are likely to be compatible, but
 have not been tested.

 ClipOn Libraries

 ClipOn includes two separate linkable libraries for Clipper.  One
 is compatible with Clipper Summer '87 and one is compatible with
 Clipper 5.0 (5.xx).  The two libraries are not interchangeable.
 The version of Clipper you are using will determine which ClipOn
 library you must use.  Both ClipOn libraries are named CLIPON.LIB
 and contain all of the ClipOn functions, except the ClipOn debug
 functions, for the version of Clipper you are using.  Be sure to
 use the correct ClipOn library for the Clipper version you are linking.

 ClipOn Debug Functions

 The ClipOn Debug functions are contained in one object file called
 CLIPBUG.OBJ.  This is so all of the Debug functions can be linked
 into the application and are available for use.  Since the Debug
 functions can be called from Clipper's debugger and are not named
 in the program code, they must be explicitly linked into the
 application or they will not be available.  Note that there are two
 separate CLIPBUG.OBJ files for each version of Clipper.

 The following examples show how to link ClipOn using MS LINK,
 PLINK86plus, BLINKER, and RTLINK using script files.


 MS LINK

 To link ClipOn using MS LINK include CLIPON.LIB in the list of
 libraries after the Clipper libraries CLIPPER.LIB and EXTEND.LIB.

 main
 test.exe
 nul.map
 clipper +
 extend  +
 CLIPON  /NOE /SE:575;         <-- Must be last

 To link the ClipOn Debug functions include CLIPBUG.OBJ in the list
 of object files:

 main +
 CLIPBUG.OBJ              <-- Must be specified separately
 test.exe
 nul.map
 clipper +
 extend  +
 CLIPON  /NOE /SE:575;         <-- Must be last


 PLINK86plus

 To link ClipOn using PLINK86 include CLIPON.LIB in the list of
 libraries before the Clipper libraries CLIPPER.LIB and EXTEND.LIB.

 OUTPUT test.exe
 OVERLAY CODE,$CONSTANTS
 SECTION = root
 FILE main,
   udf
   LIB CLIPON, clipper, extend, overlay  <-- Must be the first
 BEGIN
   SECTION into test.ovl file addproc
   SECTION into test.ovl file updproc
 END

 To link the ClipOn Debug functions include CLIPBUG.OBJ in the list
 of object files:

 OUTPUT test.exe
 OVERLAY CODE,$CONSTANTS
 SECTION = root
 FILE main,
   udf,
   CLIPBUG.OBJ            <-- Must be placed in root
   LIB CLIPON, clipper, extend, overlay
 BEGIN
   SECTION into test.ovl file addproc
   SECTION into test.ovl file updproc
 END


 BLINKER

 ClipOn provides support to dynamically link most of the ClipOn
 library using Blinker.  This can substantially increase the amount
 of memory available to a program.  If you are using Blinker with
 Clipper 5.0 or with Summer 87 and Blinker version 1.5 or later,
 then the entire ClipOn library may be specified using an ALLOCATE
 statement inside of a BEGIN/END AREA to overlay the library.  If
 you are using Clipper Summer 87 and a version of Blinker earlier
 than 1.5, then you must include the file CLIPONBK.LIB in the root
 portion of your program.  CLIPONBK.LIB contains functions that can
 not be dynamically overlaid and therefore must reside in the root
 portion of the program.  By linking CLIPONBK.LIB with CLIPON.LIB
 the routines that must be in the root are placed there while all of
 the other functions are placed in the overlay.

 Linking with Clipper S87 and pre-version 1.5 Blinker With Overlays

 To dynamically overlay ClipOn using Blinker include CLIPONBK.LIB,
 using the LIB statement, as the first library after the object
 files.  Include CLIPON.LIB, using the ALLOCATE statement, inside of
 the BEGINAREA/ENDAREA before the Clipper library EXTEND.LIB.

 OUTPUT test
 FILE main, udf
 LIB CLIPONBK.LIB              <-- Must be placed in the root area
 BEGINAREA
   FILE updproc
   ALLOCATE CLIPON.LIB         <-- Must be placed before Extend.lib
   ALLOCATE extend
 ENDAREA
 LIB clipper

 Linking with Clipper S87 and pre-version 1.5 Blinker With No Overlay

 To use Blinker without overlaying ClipOn include CLIPON.LIB, using
 the LIB statement, as the first library after the object files.
 CLIPON.LIB must be specified before the Clipper libraries
 CLIPPER.LIB and EXTEND.LIB.  Note that the file CLIPONBK.LIB is not
 needed.

 OUTPUT test
 FILE main, udf
 LIB CLIPON.LIB           <-- Place in the root
 LIB clipper
 LIB extend

 Linking with Clipper S87 and version 1.5 (or later) Blinker With Overlays

 To dynamically overlay ClipOn using Blinker 1.5 or later include
 CLIPON.LIB, using the ALLOCATE statement, inside of the
 BEGINAREA/ENDAREA before the Clipper library EXTEND.LIB.

 OUTPUT test
 FILE main, udf
 BEGINAREA
   FILE updproc
   ALLOCATE CLIPON.LIB         <-- Must be placed before Extend.lib
   ALLOCATE extend
 ENDAREA
 LIB clipper

 Linking with Clipper 5.0 and Blinker (1.5 or later) With Overlays

 To dynamically overlay ClipOn using Blinker 1.5 or later include
 CLIPON.LIB, using the ALLOCATE statement, inside of the
 BEGINAREA/ENDAREA before the Clipper library EXTEND.LIB.

 OUTPUT test
 FILE main, udf
 BEGINAREA
   FILE updproc
   ALLOCATE CLIPON.LIB         <-- Must be placed before Extend.lib
   ALLOCATE extend
 ENDAREA
 SEARCH clipper
 SEARCH dbfntx
 SEARCH terminal

 Or use the Blinker link file (included with Blinker) for Clipper 5.01.

 OUTPUT test
 FILE main, udf
 BEGINAREA
   FILE updproc
   ALLOCATE CLIPON.LIB
 ENDAREA
 @CL501MIN.LNK            <-- (or use CL501MID.LNK or CL501MAX.LNK)


 To link the ClipOn Debug functions include CLIPBUG.OBJ in the list
 of object files:

 With any version of Blinker or Clipper, include the file
 CLIPBUG.OBJ in the list of object modules to be placed in the root.

 OUTPUT test
 FILE main, udf, CLIPBUG.OBJ   <-- Include with the object files
 BEGINAREA
   ALLOCATE CLIPON.LIB
   ALLOCATE extend
 ENDAREA
 LIB clipper


 RTLINK

 Using RTLINK and Clipper 5.0, most of the ClipOn library can be
 automatically overlaid.  This can substantially increase the amount
 of memory available to a program.  Additionally, ClipOn provides
 support to build an RTLINK pre-linked library to help reduce the
 time needed to link an application and the size of the .EXE file.
 To link ClipOn using RTLINK include CLIPON.LIB in the list of
 libraries after the Clipper libraries CLIPPER.LIB and EXTEND.LIB.

 OUTPUT test.exe
 FILE main, udf
 LIB clipper,
 extend,
 CLIPON.LIB                    <-- Include after the Clipper
 libraries

 To link the ClipOn Debug functions include CLIPBUG.OBJ in the list
 of object files:

 OUTPUT test.exe
 FILE main, udf, CLIPBUG.OBJ   <-- Include with the object files
 LIB clipper,
 extend,
 CLIPON.LIB


 Creating and Using Pre-Linked Libraries With RTLINK

 ClipOn includes three files to create and use a pre-link library
 with RTLINK similar to the pre-link libraries available for Clipper
 5.01.  The files included are:  PLL_MAKE.LNK, PLL_USE.LNK, and
 PLL.OBJ.  Once the pre-link library is created, it can be included
 in your link statement to reduce the time it takes to link your
 application.


 CREATING THE PLL
 To create a pre-link library for ClipOn use the file called PLL_MAKE.LNK.

 Example RTLINK Script File:

 FILE pll                 <-- PLL.OBJ (included with ClipOn)
 PRELINK
 OUTPUT clipon            <-- Do not include an extension
 LIBRARY clipon.lib

 At the DOS prompt type:  RTLINK @PLL_MAKE.LNK

 This will build a pre-link library called CLIPON.PLL for the ClipOn
 5.01 library.


 USING THE PLL
 Once the pre-link library has been created it can be included in
 the RTLINK script file.  The file PLL_USE.LNK is an example of how
 and where to include the CLIPON.PLL reference.  The RTLINK
 statement /PLL: is used to indicate a pre-link library.

 Example RTLINK Script File:

 FILE test
 OUTPUT test.exe
 /PLL:base50         <== Clipper pre-link library: base50.pll (see
 Clipper instructions to build)
 /PLL:clipon         <== ClipOn pre-link library: clipon.pll (build
 with PLL_MAKE.LNK)


 NOTICE
 If you are using pre-linked libraries to distribute with an
 application, do not distribute the .PLT file that is created by
 RTLINK when building the pre-linked library.  Only the .PLL files
 are needed to run the executable after it is created.
.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson