PRB: Unresolved External Error Compiling for MOVE EnvironmentLast reviewed: July 17, 1997Article ID: Q92869 |
7.00 | 1.00 1.50
MS-DOS | WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSWhen an application implements the MOVE overlay scheme by defining MOVE_ENV, compiling the MOVEINIT.C file, and linking MOVEINIT.OBJ with the other files of the application, linking fails with the following error message:
L2029: '__movesegenv' unresolved external CAUSEThe default medium memory model and large memory model libraries do not support MOVE_ENV.
RESOLUTIONLink the application with the MOVETR.LIB file.
MORE INFORMATIONThe MOVE overlay scheme supports using environment variables to specify the size of the overlay heap and overlay caches at run time. The MOVEAPI.TXT file distributed with Microsoft C/C++ version 7.0 and the MOVEAPI.WRI file distributed with Microsoft C/C++, versions 8.0 and 8.00c detail the required procedure. To implement the MOVE overlay scheme, define MOVE_ENV and compile the MOVEINIT.C file. Link the MOVEINIT.OBJ file with MOVETR.LIB and the other files of your application. The text below lists the commands to compile and link the files. Note that the /Gs switch is used to eliminate calls to the stack-checking routine because the initialization in MOVEINIT occurs before the C run-time library initialization occurs.
cl /c /AM /DMOVE_ENV /Gs moveinit.c link <objs> moveinit.obj,,,movetr.lib,project.defWhen MOVE_ENV is defined, MOVEAPI.H declares the following variable:
extern unsigned short __far __cdecl _movesegenv;To avoid receiving an unresolved external error, the application must define the _movesegenv symbol in moveinit() to contain the segment address of the environment. The following three steps define _movesegenv:
|
Additional reference words: 7.00 8.00 8.00c 1.00 1.50 Visual
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |