|
Compiling Compiling Code C Implementation C++ Implementation Language Extensions Mixing Languages Assembly Language Inline Assembler Optimizing Code Numerics Programming Regular Expressions Acrtused Pragmas Precompiled Headers Predefined Macros Warning Messages Error Messages Runtime Messages Linking Optlink Switches Module Definition Files Operation and Design Error Messages Win32 Programming Win32 Programming DOS and Win16 Programming Memory Models 16 Bit Pointer Types and Type Modifiers Handle Pointers DOS DOS 32 (DOSX) Win16 Win16 DLLs Win16 Prolog/Epilog C/C++ Extensions Contract Programming __debug statement __debug declaration Dynamic Profiling Embedding C in HTML Tools BCC CHMOD CL COFF2OMF COFFIMPLIB DMC DIFF DIFFDIR DUMP DUMPOBJ DUMPEXE EXE2BIN FLPYIMG GREP HC IMPLIB LIB LIBUNRES MAKE MAKEDEP ME OBJ2ASM PATCHOBJ RC RCC SC SHELL SMAKE TOUCH UNMANGLE WHEREIS Porting to DMC++ Switching to DMC++ from Microsoft from Borland Porting Guide |
OPTLINK Error MessagesThis lists warnings, plus non-fatal and fatal error messages generated by OPTLINK. When appropriate, any probable cause and/or remedy is briefly discussed. The DOS return code and segmented .exe error flag is set upon OPTLINK encountering either a Non-Fatal or Fatal error. Warnings have no effect on the code or flag. See also /ONERROR and /DELEXECUTABLE.Each warning and error message, with added information such as the symbol name or file name involved, is displayed to stdout and added to the .map file (if selected) when its triggering condition is detected. To create a log of errors, command line redirection may be used: link foo; >logThe following rules apply when displayed: If the file name is known, it is printed. If the module name is known, it is printed (useful especially if the file name is .lib). If the error occurs at a known offset in the file, the offset (in hexadecimal) is printed. If a specific object record is being worked on, its record type (a number in hex corresponding to the standard Intel OMF or some extension) is printed. And in every case, an error number (not significant since these numbers may vary between OPTLINK versions and/or other linkers) is printed followed by the text. Warning MessagesWarnings alert the operator to an inconsistency rather than diagnosing a known error. These messages indicate code that may not execute as expected but does link. OPTLINK completes its operation and the output file may be usable.ALIAS Previously DefinedAn attempt to alias an already-defined symbol was detected. The ALIAS directive is ignored.Bad ChecksumA checksum error was detected in an input file. Perhaps the file has been corrupted.Below 100H Cannot Be InitializedWhile creating a .com file, an attempt to initialize data areas at an address lower than 0100h was detected.Cannot Allocate EMS BlocksAn EMS allocation call failed. The EMS driver has provided inconsistent information. OPTLINK will use alternative memory space instead.Cannot Generate Segmented .COM or .SYS FileA .com or .sys extension was specified as the output file name when a .def file had also been supplied.COMMON Combine type overrides othersMultiple combine types were specified for a given named segment. In such a conflict, the COMMON combine type overrides all others, and the multiple segments will be combined into a single segment.Duplicate RESOURCE, IgnoredA second resource was found within the .res file with the same name and type as one already processed. The second resource is ignored.File Not FoundThe specified .lib file could not be found in order to complete command operations. If referring to an .obj file or an indirect command file, this indicates a fatal error, described later in the fatal error section.Heap without DGROUPHeapsize was defined with no DGROUP or zero length DGROUP. Causes Windows to crash.Grouped Segments Have Conflicting FlagsSegments in a single group have different flag settings declared via the SEGMENTS directive in the .def file. Since a group is a single physical segment in protected mode, all segments that make up the group must have the same flags.This warning may be caused by the fact that any non-default flags override the default settings. That is, a MOVABLE segment overrides a FIXED segment, and the whole group becomes MOVABLE. LINNUMs in Non-CODE SegmentA LINNUM statement was encountered within a data segment.Missing LIBRARY in .DEF File for .DLLA .dll extension was specified for the output file, but no LIBRARY directive appears in the .def file. The .dll is created with default assumptions.No StackNo stack segment was supplied. If a .com or .sys file is being generated, it is normal; in other cases, be careful.No Start AddressThe end of the last .obj file was reached and start address was not detected. In assembler programming, start addresses are specified by putting a label after the END statement. In high level languages, perhaps the start up modules were not supplied. In C and C++ programs, this typically means that the program has no main(), wmain(), WinMain(), DllMain(), or LibMain().Segment Already in Different GroupOPTLINK detected a second attempt to assign a segment to a group. Each segment can belong to only one group.Stack Already Declared in ModuleOPTLINK detected a second attempt to define a stack segment. Each program can have only one stack segment. The warning is followed by the name of the module that first declared a stack.STACK Combine type overrides othersMultiple combine types were specified for a given named segment. In such a conflict, the STACK combine type overrides all others, and the multiple segments will be combined into a single segment.Start Previously Specified in ModuleMore than one start address was specified for a program. Start addresses are specified by putting a label after the END statement. Only one module should specify a start address. If OPTLINK finds more than one, it uses the first one encountered.Symbol in this LIB defined elsewhereWarning message generated from /WARNDUPS.Too Many Segments, Trying PACKCODEThe segmented .exe format can hold only 254 segments. This warning appears when more than 254 segments exist and /PACKCODE was not specified. OPTLINK automatically invokes /PACKCODE in an attempt to reduce the segment count to a number below 255.Too Many Segments, Trying PACKDATAThe segmented .exe format can hold only 254 segments. This warning appears when more than 254 segments exist after OPTLINK attempted to /PACKCODE, and /PACKDATA was not specified. OPTLINK automatically invokes /PACKDATA in an attempt to reduce the segment count to a number below 255.Unknown OptionOPTLINK encountered a misspelled, incomplete, or unsupported option switch.Unsupported GRPDEF TypeAn invalid GRPDEF record was encountered. The bad record is ignored.Non-Fatal Error MessagesThese are errors which may make the output file unusable, but did not prevent OPTLINK from completing successfully. Processing continues if any of these errors are detected, but the output file that is generated should not be used..EXE Header > 64kThe resident portion of a .dll or .exe header approaches or exceeds 64Kb. Windows loads this header into a single segment; therefore, it must be smaller than 64Kb. The sizes of the various pieces that make up the header are listed. You probably need to import/export by ordinal to reduce name table sizes.Bad COMDEF SizesAn size error was detected in a COMDEF record.Badly Formed Segment SizeThe BIG bit was set and segment size was not zero.BYTE Out of RangeCode such as:mov al, ext_abswhere ext_abs is greater than 255, was encountered. Cannot ExportSymbol cannot be exported. It may be either undefined or a constant. Symbols must have an associated segment to be exported.Cannot Reach TARGET from FRAMEA traditional "fixup overflow" was detected by OPTLINK. Usually caused by: memory-model conflicts, a segment or group being too large, segment order or combining errors (look at the map file output to diagnose this), incorrect ASSUME statements, trying to access a variable when no segment register points to it, or trying to do a NEAR CALL / NEAR JMP to a FAR routine.CEXTDEF With No COMDATThe end of an object file was reached and a CEXTDEF item remains unresolved.COMDAT Continuation MismatchA COMDAT continuation record appears before the COMDAT definition to which it refers. If you get this error, please contact Digital Mars Technical Support.COMDAT SyntaxDue to either corrupt files, translator errors, internal errors in OPTLINK, or unknown enhancements to the OMF conventions. If you get this error, please contact Digital Mars Technical Support.Constants Must Have FRAME=0A constant having a FRAME value other than zero was detected. While not prohibited in Intel's OMF format, this is not valid in the Microsoft version.CODE DirectiveA syntax error was detected in a CODE directive.DATA DirectiveA syntax error was detected in a DATA directive.Data Outside Segment BoundsOPTLINK found more data in an object module than expected. For example, an object file that indicates 5 bytes of data are to follow, and then provides 6, will cause this error. Most likely cause is that the object file has been corrupted, or that a translator error has occurred.Data Overlaps RelocationsDisplayed while the /RELOCATIONCHECK option was in effect and an overlap was detected. Probable causes include initialization of the COMMON segment in more than one module, use of the ORG statement to back up over existing code, or a translator error. The problem must be resolved, or all other addresses referenced in the output file may be wrong since relocation information is often stored as in-place linked lists.Delimited String ExpectedOPTLINK failed to find a delimited string required by the directive syntax being parsed.DGROUP + Stack + Heap Exceeds 64K - 16The total sizes of Heap, Stack, and DGROUP exceed 65,520 bytes. Try reducing the size of the stack or the heap, or use HEAPSIZE MAXVAL.Duplicate OLDA second OLD directive was encountered.Duplicate ORDINAL NumberThe ordinal number specified for this symbol was already specified for use by another symbol. Two exported symbols cannot have the same ordinal number.Duplicate RC CommandsBoth the RC directive in the .def file and the /RC option switch were supplied. Eliminate one of the two to correct the error.Duplicate STUBA second STUB directive was encountered.EXETYPE DirectiveA syntax error was detected in an EXETYPE directive.EXPORTS DirectiveA syntax error was detected in an EXPORTS directive._Export Conflicts With EXPORTSOPTLINK detected a symbol with a different name or parameter list size in the .def file than was present in the .obj file. They should agree.FIXUPP Points Past Data RecordOPTLINK detected a situation such as a FIXUPP record instructing that the doubleword beginning at byte 5 of a data record be changed, when the data record contains only six bytes (since a doubleword beginning at byte 5 would extend through byte 8). Most likely, the .obj file has been corrupted or a translator error occurred.GROUP Cannot Be Both Relocatable and AbsoluteA segment defined as SEGMENT AT was placed within a GROUP with a normal relocatable segment.Group Cannot Contain CODE and DATA SegmentsSegments in the same group have different type flag settings, via the SEGMENTS directive in the .def file or their class names. Since a group is a single physical segment in protected mode, the type for the whole group must be either code or data. It cannot contain both types.Group Size Exceeds 64kThe total size of all segments named within a Group exceeds 65,536 bytes.Groups OverlapAn overlap of groups was detected. In protected mode, groups are logical segments, and cannot be permitted to overlap. To reorder segments in such a way that the overlap is eliminated, use /REORDERSEGMENTS.HEAPSIZE DirectiveA syntax error was detected in a HEAPSIZE directive.Illegal Frame On Start AddressDetected a FIXUPP error on the start address. Check the module defining the start address.Illegal Start AddressAn absolute address was used as a start address in relocatable mode. Correct the address.IMPORT Illegal As Start AddressThe start address was specified as a symbol imported from another library. This is illegal. The start address must be in the .exe, not in a .dll.IMPORTS DirectiveA syntax error was detected in a IMPORTS directive.LOCATION Not Within FRAMEA CALL or JMP was made and the CS ASSUME is not valid.Library ErrorA library problem was detected. The most likely cause is a corrupted library dictionary.LINSYM Before COMDATA LINSYM record points to a non-existent COMDAT record. Most likely, caused by either an invalid forward reference or a translator error.Multiple DescriptionsMore than one DESCRIPTION directive was encountered in a .def file.Only One NAME or LIBRARY AllowedMore than one NAME or LIBRARY directive was detected in a .def file.Preload Segment + Relocs > 64k, Use -kA segment marked for preloading, plus its relocation information, exceeds 65, 536 bytes in size. The fast-load section of a Windows .exe file cannot accept segments larger than this. You can change the segment to movable, discardable, loadoncall, or disable segment sorting with -k.Previous Definition DifferentThis appears as messages of the form:SNN.lib(except) Offset 0791FH Record Type 00C3 Error 1: Previous Definition Different : ??1exception@std@@UAE@XZ (syscall std::exception::~exception(void ))It happens when a PUBLIC symbol appears more than once in the .obj and .lib files presented to optlink, in other words, the symbol is multiply defined. Multiple definitions of a PUBLIC symbol are an error because the linker cannot determine which one should be used. To find it, use grep to determine which files contain it: grep ??1exception@std@@UAE@XZ *.obj *.lib \dm\lib\*.libIf it is in a .obj file, use obj2asm to see if it is a PUBLIC definition or not. If it is in a library (.lib) file, use lib to generate a .lst file and see which modules in the library define the symbol. Once it is clear where the multiple definitions are coming from, it's possible to figure out why and what to do about it. PROT vs REAL ConflictA conflict between real mode and protected mode syntax was encountered.PUBDEF Must Have Segment IndexOPTLINK encountered a PUBLIC symbol that had no reference into a defined SEGMENT. Most likely cause is a corrupt object file, due either to a disk accident or translator error.Relocatable Bases Not Allowed in Absolute ModeReference to relocatable data was encountered while processing code in Absolute Mode. That is, the .obj module(s) cannot reference segments or groups, cannot do far jumps or calls, and cannot do DD LABEL, when generating a .com or .sys file, unless the target segment has been declared to be absolute (SEGMENT AT).Segment >= 4GThe total size of a 32-bit segment exceeds 4 gigabytes (" 4G").Segment Size Exceeds 64kThe total size of a segment exceeds 65, 536 bytes (" 64K").SEGMENTS DirectiveA syntax error was detected in a SEGMENTS directive.Short JMP Out of RangeThe destination of short JMP instruction was more than 125 bytes from the location of the instruction.Start Address Must Be 100HThe .com file option has been selected and a starting address (END start_addr) other than 0100h was also specified.Symbol UndefinedA symbol remained undefined after all input files, including libraries, had been processed. Common causes for this are:
Too Many ENTRIESMore than 65,536 entries were specified.Too Much DEBUG Data for Old CodeView FormatOPTLINK detected more than 64KB of debug information per type per module, and the CodeView option has been enabled for a CodeView version prior to 4.0.Unknown COMDAT Allocation TypeEither corrupt files, translator errors, internal errors in OPTLINK, or unknown enhancements to the OMF conventions. If you get this error, please contact Digital Mars Technical Support.Unrecognized data in .CFGSyntax error within optlinks.cfg.Unrecognized FIXUPP TypeMost likely cause is the object file has been corrupted, or a translator error has occurred.Unrecognized RecordA record in an object file cannot be recognized as one of the defined record types. The unrecognized record is skipped and linking continues.Weak EXTRN DifferentA "weak EXTERN" declared with a different default in another module was encountered.WeakLazyAlias InternalA specific internal error condition was detected in OPTLINK. If you get this error, please contact Digital Mars Technical Support.Fatal Error MessagesThese prevent a successful completion of OPTLINK, processing stops immediately upon detection. An executable or possibly a partial executable may have been created. This file is unusable and should be deleted..DEF Syntax ErrorAn invalid .def file syntax could not be parsed..RES File CorruptThe compiled resource (.res) file was found to be corrupt. To correct it, rebuild the file using the rc.exe resource compiler and its /r option switch.APPLOAD Must Appear Before Any SegmentsA segment precedes the APPLOADER directive in a .def file.Bad FIXUPP ThreadA FIXUPP thread was referenced prior to being defined. The .obj file is corrupt and must be regenerated. This condition can only be caused by a translator error.Bad LOC Frame in Start AddressAn undefined FIXUPP frame was referenced in a start address. The object file is corrupt and must be regenerated. This condition can only be caused by a translator error.Bad OMF ExtensionThe format of a type A0 COMENT record cannot be recognized.Bad STUB FileAn error was detected while parsing the specified STUB file. Indicates an invalid DOS .exe file.Cannot Create FileA requested output file cannot be created. Most probable causes are the requested file name contains an invalid character, or the output disk directory is full (applicable only to root directories).Cannot parse Class recordCorrupt debug information.Cannot Reopen Output FileA file access error was encountered, probably due to a sharing violation on the output file.Circular ALIASA chain of aliases references itself.Colon ExpectedAn OPTLINK option that requires a number is requested, and the ":" or following number is not given. Try the operation again, being sure to supply all required numbers.Dictionary Exceeded 512kLibrary dictionaries have a size limit of 512Kb, which is unlikely to ever be reached unless the /IMPLIB switch is used incorrectly.Disk Full WritingOPTLINK failed to find enough space on the disk to write the required output (or virtual memory) file.DOS Critical ErrorDOS detects a "critical error" while processing a read or write function for OPTLINK.DOSSETFILEINFO ErrorAn OS/2 critical error occurred.EMS ErrorOPTLINK was notified of an EMS error while attempting to access expanded memory. The only known causes for this error are faults in either the EMS driver or the EMS hardware.EXPORTed Names Text >64kThe exported names text exceeds the limit. Try using the /NONAMES link option.Filename ExpectedOPTLINK failed to encounter a required file name as input.File Not FoundCommands were given to perform an operation with a object file which cannot be found.Illegal FilenameA file name cannot be parsed into a valid format.Illegal Record SyntaxOPTLINK was unable to decipher the syntax of a record in an object file. The most likely cause is that the object file is corrupt, due either to a disk accident or to a translator error./IMPLIB Needs Larger /PAGESIZESet the /PAGESIZE link option to a larger number.Incremental Compile ErrorA record was detected that says the .obj file being processed is corrupt. Compilers such as Microsoft Quick C may create such records upon detecting certain errors during an incremental compile.Index RangeA record in the object file provides an index value which is outside the allowable range of values. The most likely cause is that the object file is corrupt, due either to a disk accident or to a translator error.Indirect File Nested Too DeepThe nesting level for indirect files exceeds 10.Limit of 65535 Base FIXUPPs ExceededAttempted to created more than 65,535 relocation entries for a real-mode executable. This limit is imposed by the structure of the .exe file.Module or Dictionary CorruptWhen attempting to read a .obj or .lib module, the first record was invalid. This error can be caused by passing some other file mistakenly as a .obj or .lib (syntax error). It also can be caused by invalid library dictionaries built by incompatible tools.Need Larger /ALIGNMENT ValueThe segmented (Windows or OS/ 2) executable is larger than 64KB * ALIGNMENT. Alignment is the page boundary in the .exe or .dll on which all segments will start. These segments are referred to elsewhere by a 16-bit page number. OPTLINK defaults to an ALIGNMENT of 16 (limits an executable to 1MB) to reduce wasted space between segments, while other linkers normally waste space by defaulting 512. To fix the problem, increase the ALIGNMENT size.No Segments Linked!No input files could be processed. Therefore, no file could be created.Not a Valid Library FileA .lib file fails to meet the criteria for .lib files.Number OverflowA number greater than 65,535 (16 bits) was supplied on the command line.OBJ Record Too LongAn object record exceeds 6000 bytes in length. The .obj or .lib file is probably corrupt.Out of MemoryOPTLINK does not have enough memory to continue operation. OPTLINK needs to have a minimum of 200KB available. Try removing a TSR or two, and link again, or (if you are using a makefile) link from outside the MAKE program.Overflow 32-bit MultiplyOPTLINK's far global data allocation routines encounter an address value which they cannot successfully calculate. While it is documented here for completeness, you are not likely to see this message.Selector Already ReleasedAs a result of an internal processing error within OPTLINK. If you get this error, please contact Digital Mars Technical Support.Swap File FullVirtual memory is exhausted. Delete any unnecessary files from your disk and try again.Token Too LongA symbol name or other token exceeds the 468-character limit. The .obj or .lib file is probably corrupt. The too-long symbol is appended to the message.Too Many Relocs to EXEPACKMore than 8,191 segment relocations per 64KB of data were involved while performing EXEPACK on real-mode executable.Too Many Segments For Segmented .EXE FormatThe segmented .exe format can hold only 254 segments. Number of segments has been exceeded, even after /PACKCODE and /PACKDATA have been used. Try using .dll's to contain some segments and thus reduce the size of this module.Too Much EXESTR DataMore than one megabyte of EXESTR data (created by a MSC6. 0 pragma) exists. OPTLINK supports up to one megabyte of EXESTR data.Unexpected End of FileOPTLINK encountered the end of an input file before finding a MODEND record. The most likely cause is that the object file is corrupt, due either to a disk accident or to a translator bug.Unknown FIXUPP Frame TypeOPTLINK was unable to determine the frame type of a FIXUPP record in an object module. Most likely cause is that the object file has been corrupted, or that a translator error has occurred.Unrecognized B2 RecordOPTLINK found a type B2 record in its input files and was unable to determine the meaning of the record. Most likely cause is that the translator has added an undocumented extension to the B2 record usage.Unrecognized Communal SyntaxOPTLINK detected an error while processing a type B0 (Communal Data) record.Unrecognized RecordOPTLINK cannot recognize the type of a record in an object file.User ABORTThe user pressed Control-C or Control-Break to abort the link operation.XMS ErrorOPTLINK was notified of an XMS error while attempting to access extended memory. The only known causes for this error are faults in the XMS driver. |