Build

The Build command compiles only those files in the project that have been modified since they were last compiled and then links all files to create a .DLL or .EXE file. The Graphical Development Environment checks a file's date to determine if it has been modified since it was last compiled.

In addition to compiling and linking Windows programs, the Build command also runs the Resource Compiler if an .RC file is included in the project.

·To build a program:

1.From the Project menu, choose Open to set a multimodule project list. If you are using a single-module source file, this step is optional.

2.From the Options menu, choose the Project command to set the compiler and linker options.

3.From the Project menu, choose the Build command to create the program file.

A multimodule program can contain any number of source files (.C), include files (.H), object files (.OBJ), library files (.LIB), module-definition files (.DEF), and resource files (.RC).

Multimodule programs require a project list to contain the names of all the files needed by the program as well as any project dependencies. If you have not created a project list, the compiler assumes that the current file is the only module in the program.

Use a project with a single-module source file if you want to save compiler and linker options.

Every Windows program or library must have a module-definition file. If you try to build a Windows program without specifying a .DEF file in the project list, the Graphical Development Environment issues a warning and creates a .DEF file with the following defaults:

Element Default

Filename EXENAME
Executable file type Windows
Stack size 5120
Stub WINSTUB.EXE
Heap size 1024

You will need to manually insert an EXPORTS section into the .DEF file to include the functions Windows needs to export.

Module-definition files are also required for QuickWin programs. The Graphical Development Environment automatically creates a .DEF file with the above default settings for a QuickWin program.

Related Commands

Project menu: Open, Compile File Options menu: Project

See Also

Projects , page 3; Building and Running a DOS Program, page 35; Building and Running a QuickWin Program, page 33; Building and Running a Windows Program, page 31