httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Khoa Do <>
Subject patching the compling for windows to include command line build
Date Wed, 07 Nov 2001 23:50:42 GMT
	I had some conversations with William A. Rowe concerning the
commandline build using Visual Studio and the .dsw file rather than using
nmake and makefiles.  The documentation has warned that using nmake and
makefiles cannot be relied on and thus using the ide build method would be
the best method for those who do not enjoy using the mouse, do not enjoy the
overhead and time it takes for Visual Studio to load the projects, and wish
to automate their builds.  I was wondering if you could include instructions
in the documentation for people who may have version 6.0 or later.  The
instructions for this could probably look like:

	"For those users who have Visual Studio 6 or later, an alternate
method for building Apache on the commandline is to use the Visual Studio
IDE.  The syntax is:
msdev MyWorkspace.dsw /MAKE "MyProject1 - Win32 Release" "MyProject2 - ALL"
/OUT MyWorkspace.log

or msdev MyProject.dsp /MAKE "MyProject - Win32 Debug" /REBUILD

or (maybe a batch file?)"

The citation for this is: 
MSDN Library - July 2001\Visual Studio 6.0 Documentation\Visual C++
Documentation\Visual C++ User's Guide\Working with Projects\How Do I ...
Topics: Working With Projects and Workspaces\Building a Project\Building a
Project from the Command Line

Building a Project from the Command Line
You can build a Visual C++ project from the command line without first
exporting a makefile (MAKEFILE, or filename.mak) and using the NMAKE

The basic command syntax is

msdev FileName [/MAKE "ProjectName - ConfigName | ALL"] [/REBUILD /CLEAN

where FileName is the name of your project (.dsp) or workspace (.dsw) file. 

For example, the following syntax deletes all intermediate files and then
builds a project called MyProject:

msdev MyProject.dsp /MAKE "MyProject - Win32 Debug" /REBUILD

The following syntax builds a workspace that contains (at least) two
projects, building the release configuration of MyProject1 and all
configurations of MyProject2, and directing the build output to a file
called MyWorkspace.log:

msdev MyWorkspace.dsw /MAKE "MyProject1 - Win32 Release" "MyProject2 - ALL"
/OUT MyWorkspace.log

Note   Projects created in Visual C++ versions earlier than 5.0 must first
be converted before you can build them from the command line. To convert a
project, open it inside the development environment.

You can also build all configurations of a certain type within a single
project, for example, if you have defined multiple types of Debug
configurations. For more information, see "Building by Type of

Tip   Type msdev /? /OUT FileName to pipe the command syntax to a file. 

The /MAKE Option
The /REBUILD, /CLEAN and /NORECURSE options all modify the /MAKE option, and
are meaningless without it. Also, unless you specify a FileName after msdev,
any /MAKE options will be ignored. /MAKE requires at least one

Parameter Description 
FileName A valid workspace or project filename. Must have an extension of
.dsp or .dsw. 
ProjectName The project that contains the configurations you want to build.
If Filename is a workspace file, ProjectName must be a part of that
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).  

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.  
/? Displays usage information for the msdev command. 
/CLEAN Deletes intermediate files created during the build process for the
specified configuration(s); does not build the project configuration(s).  
/REBUILD Cleans and builds the specified configuration(s), including all
dependent projects. Takes precedence if both /CLEAN and /REBUILD are
/NORECURSE Builds the specified project configuration(s) without building
any dependent projects. 
/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 PATH, INCLUDE and LIB
paths must be set correctly for the build to succeed when /USEENV is
/EX MacroName Invokes the named macro (if the associated .dsm file is not
loaded, this command will fail). 

Tip   Type msdev /USEENV at the command line to launch Visual C++ and use
the environment variables for the duration of that IDE session.

Building by Type of Configuration
For any single project, you can build all configurations of a certain type.
The build system uses limited pattern matching to recognize the name of the
configuration you specify. 

For example, if your project contains Debug and Release configurations for
both regular and UNICODE applications, you can build both configurations for
only the UNICODE application by issuing the following command:

msdev MyProject.dsp /MAKE "MyProject - UNICODE" 

Or, if your project contains several types of Debug and Release
configurations, you can build all of the Debug configurations:

msdev MyProject.dsp /MAKE "MyProject - DEBUG" 

This pattern matching gives you even more flexibility when customizing your
batch builds.

Send feedback to MSDN.Look here for MSDN Online resources. 

The pages are:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message