Скачиваний:
17
Добавлен:
10.05.2014
Размер:
4.65 Кб
Скачать

Здесь будет находиться текст помощи при работе с уроком

This guide describes how to build 32-bit applications for Windows and dynamic-link libraries (DLLs) using the Microsoft Win32 Software Development Kit (SDK). It describes the components of a generalized makefile and includes information on using the C run-time libraries.

The following table summarizes the steps used to build a Win32 application or DLL:

Steps to Building Applications

Step Tool

1. Compile C and C++ source-language files into object files. C/C++ compiler (CL)

2. Create and edit resources. Doing so may also create include (.H) files which define useful constants. Dialog Editor, Image Editor, and Font Editor (DLGEDIT, IMAGEDIT, and FONTEDIT)

3. Compile resource scripts to linkable resource files. Resource Compiler (RC)

4. Compile the module-definition file for each DLL to an import library and export library. Library manager (LIB)

5. Link the object modules, resources, standard libraries, and import libraries (for an application using DLLs) or export library (for a DLL) to produce an application. Linker (LINK)

6. Use the appropriate switches to build a debugging version of the application or DLL. Linker switches: /debug:full, /debugtype:cv

If you are familiar with the process of building applications and DLLs for Windows 3.x, you will notice some differences. The following parts of the build process are new or different with Win32:

· Resources are linked along with object modules and libraries. You do not need to run the resource compiler to add resources to the executable file.

· When building a DLL, create an import library from a .DEF file, then link the DLL with the import library. The linker does not accept a .DEF file when resolving imports.

· When linking a DLL, you must specify the name of the initialization routine using the linker /ENTRY option. This is the result of the new DLL initialization and termination model in Win32.

· You link a DLL with an export library (.EXP file). The export library is generated by LIB at the same time it generates the import library from the .DEF file.

The sample makefiles provided with the SDK samples give good examples of the build process. Each of them includes WIN32.MAK, which defines most of the common macros you need to build 32-bit applications for Windows NT and Windows 95. For information on source code considerations in porting your code from 16- to 32-bits, see the following topics:

Porting 16-Bit Code to 32-Bit Windows

Handling Messages with Portable Macros

Writing Portable C Programs

WINDOWS.H and STRICT Type Checking

Соседние файлы в папке 2 _(раздел Основы архитектуры 1, урок 1)