Building Software -- Working with the Command Shell for Windows 2000/XP/2003

Building a Web Server, for Windows

The Command Shell

Open the command shell (also referred to as the command-line)...

Default cmd.exe window
Start » Run : cmd.exe

Example: Change the directory and drive...

Directory and Drive change

Change to the root directory (C:\) of the current drive...

cd \

Change to another drive and its root directory (E:\)...

E:

Change to a top-level (specified by the beginning '\') directory (E:\Program Files\) that contains a space -- has to be quoted...

cd \"Program Files"

Change to directory (E:\Program Files\Apache2\) -- since no beginning '\' is used, this directory must be located under the present directory (E:\Program Files\)...

cd Apache2

Setting the Build Environment

When using the command-line with Visual C++, the environment has to be set. There are several ways to perform this task. Note that this will only hold for the current cmd.exe window.

Working with the Build Environment

Example: Setting the PATH

Environmental variable 'PATH' specifies the search path for executables (EXEs), libraries (DLLs), and other important files. This variable is often updated to reflect the additional tools that will be used during the build process.

Example for adding executables perl (under C:\www\perl\bin), awk, bison, flex, sed (under C:\GnuWin32\bin) to the PATH -- tools used in the Apache2 (and related) build process...

If using the command-shell (or Visual Studio .NET Command Prompt)...

If using the Visual Studio Workspace IDE...

Information and Help

Command shell overview