Share via


Building Projects and Workspaces on the Command Line

Use the EVC utility to build a project or workspace file from the command line. Here is the proper syntax for building a project:

evc filename [/MAKE "Project – ConfigName"|"Project ALL"]
[/REBUILD /CLEAN /NORECURSE /OUT LogFile /USEENV /EX MacroName /CECONFIG configuration]

Return Value

The evc return value represents the number of errors that occurred during the build.

The following examples demonstrate the syntax for building a project for a Palm-size PC that uses an MIPS processor and for an emulated Handheld PC Pro (HP/C Pro) that works with Microsoft Windows CE for the Handheld PC Pro, version 2.11:

  • Pocket PC

    evc Myproject.vcp /make "Myproject - Win32 (WCE MIPS) Debug" /ceconfig="Pocket PC" /rebuild
    

  • H/PC

    evc Myproject.vcp /make "Myproject - Win32 (WCE X86em) Debug" /ceconfig="H/PC Pro 2.11" /rebuild
    

You can use the following command line to redirect the evc command syntax to a file:

evc /? /OUT FileName

You can type the following command line to launch eMbedded Visual C++ and use the environment variables for the duration of that IDE session:

evc /USEENV

EVC Parameters

Parameter Description
FileName A valid workspace or project filename. Must have an extension of .vcp or .vcw. You can also load a source file instead of a project.
Project The project that contains the configurations to build. If Filename is a workspace file, Project must be a part of that workspace.
ConfigName Any valid project configuration, or all configurations for a particular project. To build all configurations, simply type ALL for the configuration value (must be uppercase). Corresponds to the choices available from the Settings For drop-down list in the Project Settings dialog box.
LogFile Name of an optional file used to store the build output information (valid only with the /OUT option).

EVC Options

Option Operation
/MAKE "projectname1 – configuration1 | projectname1 – configuration2 | projectname2 – configuration1 | ALL" Builds the specified configurations. The /CLEAN option modifies /MAKE so that the specified configurations are cleaned rather than built. Requires a FileName parameter after evc and a project with at least one configuration.
/? Displays usage information for the evc command.
/CLEAN Deletes intermediate files created during the build process for the specified configurations; does not build the project configurations. Requires /MAKE.
/REBUILD Cleans and builds the specified configurations, including all dependent projects. Requires /MAKE. Takes precedence if both /CLEAN and /REBUILD are specified.
/NORECURSE Builds the specified project configurations without building any dependent projects. Requires /MAKE.
/OUT logfile Creates a log file for the build output, which includes such information as syntax errors and warnings. If you don't specify a filename, the build output information is displayed at the command prompt and is not saved to a file.
/USEENV Directs the build system to use environment variables for the current build session, rather than the directory settings specified on the Directories tab (Tools menu, Options command). The SOURCE, PATH, INCLUDE and LIB paths must be set correctly for the build to succeed when /USEENV is specified.
/EX MacroName Invokes the named macro (if the associated .dsm file is not loaded, this command will fail).
/CECONFIG configuration Uses the specified Windows CE platform configuration (such as H/PC Pro 2.11).

See Also

Building Applications on the Command Line, Building Makefiles on the Command Line, Environment Variables for Cl.exe and Link.exe