Build Method

Applies To   See Also

Rebuilds a project, or creates an application file (.app), dynamic link library (.dll), or executable file (.exe) from a project.

Syntax

Object.Build([cOutputName] [, nBuildAction] [, lRebuildAll]
  [, lShowErrors] [, lBuildNewGUIDs])

Arguments

cOutputName

Specifies the name of the application, dynamic link library, or executable file that is created.

If cOutputName includes a file extension and nBuildAction is omitted, the file extension in cOutputName determines the type of file built. For example, if the extension in cOutputName is “.exe” an executable file is created.

nBuildAction

Specifies if the project is rebuilt or an application, dynamic link library, or executable file is created.

The following table lists the values for nBuildAction with a description of each.

nBuildAction FoxPro.H Constant Description
1 BUILDACTION_REBUILD (Default) Rebuilds the project.
2 BUILDACTION_BUILDAPP Creates an .app.
3 BUILDACTION_BUILDEXE Creates an .exe.
4 BUILDACTION_BUILDDLL Creates a .dll.

If cOutPutName doesn’t include an extension, the appropriate extension is added.

lRebuildAll

Specifies if files in the project are recompiled before an .app, .dll, or .exe is created. If lRebuildAll is true (.T.), the following are recompiled:

If If lRebuildAll is false (.F.) or is omitted, files in the project are not recompiled before the .app, .dll, or .exe is created.

lShowErrors

Specifies if compilation errors are displayed in an editing window after the build is complete. If lShowErrors is true (.T.), the errors are displayed. If If lShowErrors is false (.F.) or is omitted, compilation errors aren’t displayed.

lBuildNewGUIDs

Specifies if new registry GUIDs (globally unique identifiers) are generated when an executable file or dynamic link library is created. If lBuildNewGUIDs is true (.T.), new GUIDs are generated. If lBuildNewGUIDs is false (.F.) or is omitted, new GUIDs aren’t generated. lBuildNewGUIDs is ignored if nBuildAction is less than 3.

Remarks

A logical true (.T.) is returned if the project is successfully rebuilt or an .app, .dll, or .exe is successfully created without errors; otherwise false (.F.) is returned.