LINK4.EXE

New version of Windows linker
---------------------------------------------------------------------------
   A new version of the Windows SDK linker, LINK4, is provided which will
link C 5.0 object files into Windows executables.  This new linker is
required due to changes in the C 5.0 object file format.  The new linker
requires the use of the /NOE linker switch when developing Windows
programs.  This switch instructs the linker not to use extended
library searches when unresolved externals occur as library modules are
linked into the executable.  The default extension used by this LINK4 for
dynamic link libraries is DLL.  Either rename the library with an EXE
extension or specify the name and extension for the executable for
the linker.  Example:

      LINK4 MYDLL.OBJ,MYDLL.EXE,MYDLL.MAP,SWINLIBC/NOE,MYDLL.DEF

   Listed below is a modified version of the MAKE file for the Windows 1.0
SDK sample application HELLO illustrating the use of the /NOE switch:
---------------------------------------------------------------------------
#
#  Standard command line definitions
#

cp=cl -d -c -AS -Gsw -Os -Zpe

#
#  Standard inference rules
#
.c.obj:
    $(cp) $*.c

#
#  The C File List
#

hello.obj: hello.c hello.h

hello.res: hello.rc hello.ico hello.h
    rc -r hello.rc

hello.exe: hello.obj hello.res hello.def
    link4 hello,/align:16,/map,slibw/NOE,hello.def
    mapsym hello
    rc hello.res
---------------------------------------------------------------------------


WINDOWS.H

Modified verison of Windows include file
---------------------------------------------------------------------------
   The C 5.0 compiler provides much stronger type checking than in the
previous version.  The WNDCLASS structure in WINDOWS.H should be modified
to correctly declare the lpfnWndProc member.  The correct WNDCLASS structure
is listed below:

typedef struct {
    WORD    style;
    long    (FAR PASCAL *lpfnWndProc)();
    int     cbClsExtra;
    int     cbWndExtra;
    HANDLE  hInstance;
    HICON   hIcon;
    HCURSOR hCursor;
    HBRUSH  hbrBackground;
    LPSTR   lpszMenuName;
    LPSTR   lpszClassName;
} WNDCLASS;

   An updated version of WINDOWS.H, with this WNDCLASS, is provided and
can be used in place of the WINDOWS.H shipped with the Windows 1.0 SDK.

-------------------------------------------------------------------------

SLIBW.LIB
SWINLIBC.LIB
CLIBW.LIB
CWINLIBC.LIB
MLIBW.LIB
MWINLIBC.LIB
LLIBW.LIB
LWINLIBC.LIB

Library Files
-------------------------------------------------------------------------
   New versions of the Windows libraries are provided which are compatible
with the C 5.0 run-time libraries.

Windows 2.0
-------------------------------------------------------------------------
   If the application or dynamic link library that is being developed
for Windows 1.0 is run under Windows 2.0, an error message will be displayed.
The Windows 2.0 loader checks an ID value in the executable file header to
determine if the executable is a Windows or OS/2 program.  The Windows 1.0
loader does not check this ID value.  In order to create an executable that
will run under Windows 1.0 and 2.0, the definition file should be modified
to instruct the linker to set the executable header ID for Windows.  This
is accomplished by adding EXETYPE WINDOWS to the .DEF file.  When the
Windows 2.0 SDK ships, the use of EXETYPE will be optional.

   Listed below is a modified version of the .DEF file for the Windows 1.0
SDK sample application HELLO illustrating the use of EXETYPE:
---------------------------------------------------------------------------
NAME    Hello

DESCRIPTION 'Simple Microsoft Windows Application'

STUB    'WINSTUB.EXE'

EXETYPE WINDOWS
CODE    MOVEABLE
DATA    MOVEABLE MULTIPLE

HEAPSIZE  128
STACKSIZE 4096

EXPORTS
    HelloWndProc @1
    About        @2
