Using the C runtime DLL

There are C runtime DLLs called rsxntcs.dll and rsxntcm.dll that contain all code of the C library. You can link one of those libraries to your application to reduce the executable size. The crtrsxcm.dll runtime DLL is used for multithread applications and crtrsxcs.dll for singlethread apps.

Win3.1 with Win32s extension cannot use the multithread DLL.

Source code:

To use one of the C runtime DLLs you must include the file <crtrsxnt.dll> in all your source files. This file must be included to use the exported data from the DLLs.

Compiling applications with the RSXNTCS.DLL or RSXNTCM.DLL

The switch -Zcrtdll=crtrsxnt links the single-thread CRT DLL to the application.

The switch -Zcrtdll=crtrsxnt -Zmt links the multi-thread CRT DLL to the application.

Example:

	gcc -Zwin32 -Zmt -Zcrtdll=crtrsxnt test.c
	gcc -Zwin32 -Zcrtdll=crtrsxnt test.c

Minimal size of Applications using a CRT DLL.

Section Bytes
Win32 header size 1024
Text size 4096
Data size 4096
Import section size 512
Reloc section size 512
Total size 10240