Clipper Support Bulletin #7 .RTLink questions and answers Copyright (c) 1991, 1992 Nantucket Corporation. All rights reserved. Version: Clipper 5.0, version 5.01 Date: 22nd January, 1992 Revised: 22nd May, 1992 Status: Active ================================================================================ This Support Bulletin covers the following topics: 1. Can I disable .RTLink's use of expanded memory? 2. Does incremental linking work? 3. What is the difference between the LIB and SEARCH statements? 4. What is the easiest way to create a prelinked library? 5. What is the current default stack size? 6. What does "Cannot combine common segment " mean? 7. Is there any overhead associated with static overlays? 8. Additional Notes 8.1. Automatic Search Requests 8.2. NOTABLEOFCONTENTS 8.3. Order Of Symbol Searching 8.4. MODULE Overides LIB 8.5. Calling a Symbol in the Same Static Overlay Area ================================================================================ 1. Can I disable .RTLink's use of expanded memory? .RTLink hangs occasionally with 386 Max (and other memory managers). To turn off EMS useage, use SET RTLEMSOFF=1. To turn off XMS useage, use SET RTLXMSOFF=1. An alternative to slow swap files being created when you turn off EMS or XMS useage is to redirect the swap file to a RAMdisk. To do this, specify WORKFILE E: in the link file, or set the environmental variable TMP to E:. ================================================================================ 2. Does incremental linking work? Yes, but it only works on Clipper code. Therefore, the effect is not very noticable unless you use a prelinked library so that you are not relinking the code in CLIPPER.LIB. ================================================================================ 3. What is the difference between the LIB and SEARCH statements? Nothing. SEARCH is included for compatibility only. ================================================================================ 4. What is the easiest way to create a prelinked library? How do I determine what should be REFERed and what should be EXCLUDEd? The easiest way to create a (.PLL) file is to use the NOTABLEOFCONTENTS command to list all the symbols that are being linked in. You must also specify the VERBOSE command. Then use REFER to specify these symbols in your linker script file. REFER adds a symbol to the search request list, and EXCLUDE removes one. ================================================================================ 5. What is the current default stack size? The default stack size is 1000 hex (4096 dec). If problems are encountered, try increasing the stack size to 5000 hex (20480 decimal). This can be done using the STACK command, as follows: STACK 5000 // 5000 hex STACK 20480. // Hex syntax, but period specifies decimal /STACK:20480 // 20480 decimal /STACK:5000. // Hex syntax, but period specifies hex ================================================================================ 6. What does "Cannot combine common segment " mean? Common segments cannot have a symbol in an .EXE and another in a prelinked library. To correct the problem either EXCLUDE the symbol that is in the (.PLL) or INCLUDE the symbol that is in the .EXE. Either way, both symbols must be moved so that they are in the same place. ================================================================================ 7. Is there any overhead associated with static overlays? Yes. When a static overlay is created, the Static Overlay Manager is included in the .EXE file. As this takes up about 10K, the overlay being created must save this much memory in order to be useful. ================================================================================ 8. Additional Notes ---------------------------------------------------------------------------- 8.1. Automatic Search Requests Automatic search requests (the ones the compiler puts in to automatically search all the Clipper libraries) are satisfied AFTER the search of any libraries listed in the LIB statement. For example: C>RTLINK FI MyObj LIB FuncLib FuncLib will be searched BEFORE Clipper, Extend, etc. If you want CLIPPER.LIB to be searched before FuncLib, use the following: C>RTLINK FI MyObj LIB Clipper, FuncLib ---------------------------------------------------------------------------- 8.2. NOTABLEOFCONTENTS The NOTABLEOFCONTENTS command can be used to prevent unresolved symbols in cases where the table of contents is not complete for some reason. NoTableOfContents causes the linker to manually search each object and library file instead of using the table of contents to determine what symbols each file contains. Libraries created with Borland's TLIB utility have a table of contents that .RTLink does not recognize, and should be linked using the NOTABLEOFCONTENTS command. ---------------------------------------------------------------------------- 8.3. Order Of Symbol Searching A prelinked library will satisfy a search request BEFORE any object or library files are searched. Therefore, a symbol in a (.PLL) will always take precedence over a symbol in the (.OBJ) or (.LIB). ---------------------------------------------------------------------------- 8.4. MODULE Overides LIB The MODULE command, which forces a file to be overlayed, overrides the LIB command, which causes symbols from the file being linked to be put into the root ---------------------------------------------------------------------------- 8.5. Calling a Symbol in the Same Static Overlay Area To allow static overlays to be called from a symbol in the same overlay area, the command RELOAD FAR must be used to allow the RETURN to take place properly. The default figure for the reload stack is 100 this allows you to make 100 calls into an overlay section before any RETURNs are recorded. Increasing this figure to 200 provides enough entries in the overlay entry table to handle the code and function calls in a standard C runtime library. * * *