Share via


Project Creation

You can customize a platform by adding or subtracting projects. A project is a group of related functions that implement a particular feature of your customized platform. A platform is a specific implementation of a Microsoft® Windows® CE operating system (OS) for a target device. A platform consists of an OEM adaptation layer, device drivers, and OS and application features. A workspace contains all the files that make up a platform, and all the projects in a workspace must be associated with a platform.

In Platform Builder you can use a project wizard to create a project, which is given an associated Platform Builder project (.pbp) file name extension. This .pbp file contains source file names and locations, and build settings. The types of projects that you can create in Platform Builder include applications, dynamic-link libraries (DLLs), static libraries, and transport layers.

In the Microsoft® Windows® CE .NET OS, you can use Microsoft eMbedded Visual C++® 4.0 to create the following items:

  • Applications for Microsoft Foundation Classes (MFC) for Windows CE
  • Objects for MFC Component Object Model (COM)
  • COM projects for the Active Template Library (ATL) for Windows CE.

Samples, header files, and library files are located in the %_WINCEROOT%\Others\MFC directory and in the %_WINCEROOT%\Others\ATL directory. Once these projects have been created, you can use Platform Builder to add them to your platform.

Creating a Project

When you use the project wizard in Platform Builder to create a project, you select a specific type of project to create. The options provided by the wizard vary, depending on the type of project you are creating.

The following table shows the project types that are available.

Project type Description
WCE Application An empty project, a Windows CE–based application, or a Windows CE–based Hello World application.
WCE Console Application An application that runs in a console window.
WCE Dynamic-Link Library An empty Windows CE DLL, a simple Windows CE DLL, or a DLL that exports some symbols.
WCE Static Library A Windows CE static library.
WCE Transport Layer A project for a device-side transport layer. This project also provides the source code for a host-side project, which requires eMbedded Visual C++ 4.0 to build.
WCE Tux Dynamic-Link Library A framework for a module that defines a test for the Windows CE Test Kit (CETK). The Tux test harness for the CETK executes this module to add the functionality of the test to the CETK.

For most projects that you create using the project wizard, the wizard automatically generates a set of source files that implement the basic features of your project when compiled. These files include source and header files for your project, as well as a text file that describes the contents of the starter files.

The wizard does not generate source files if you create the following items:

  • An empty Windows CE–based application.
  • An empty DLL.
  • A Common Object File Format (COFF) file that has a .lib file name extension and does not contain a precompiled header (.pch).

During the creation of the project, the wizard gives you options for customizing the source files. After the project is created, choose the FileView tab in the Workspace window to view the project files.

You can also customize the project by specifying include paths. To do this, from the Tools menu in the IDE, choose Options, and then choose the Directories tab. On this tab, you can enter include paths for your project in the Directories field.

Note   In the IDE, you cannot use environment variables such as %_WINCEROOT% in your include paths. You must specify the full include path for your project.

Building a Project

With Platform Builder, you can build projects in a hierarchy, or you can build a selected project. When you build a selected project, the subprojects are included, and they are built recursively. A subproject is a project that has dependents. If you have selected only a subproject, that subproject and all of its subprojects are built.

You can select and build files in any project in a workspace. Because builds occur in the background, you can continue to use Platform Builder during a build.

Note   Some menu commands and toolbar buttons are disabled for the duration of the build.

Before building a project you choose the active configuration, which determines which set of build options is used. The following table shows build options that are available from the Build menu.

Build option Description
Build project Builds the active project.
Rebuild All Deletes all intermediate and output files, and then builds the active project and all project dependencies.
Build Selected Features Builds one or more .pbp files, as well as dirs, sources, and .mak files, and prebuilt feature files. This command is not available for projects that are excluded from the build.
Batch Build Builds multiple projects at once.

If, while building a project, Platform Builder determines that the platform headers are outdated, a dialog box showing the following three options appears: building the project with headers regenerated, building the project without regenerating the headers, and canceling the build process.

Information about the build appears on the Build tab of the Output window in the IDE. The tab displays information from the build tools and lists any errors or warnings that occurred during the build. If there is no activity on the Build tab, you can monitor the status from the status bar, which displays the Building icon during the build.

If the tab reports no errors, the build is successfully completed. If the tab reports errors, you may need to perform debugging after the build is completed.

When the build process is complete, Platform Builder also notifies you with a beep. If you have a sound card installed, you can use the Sounds icon in Control Panel to assign different sounds to three standard system events.

The following table shows the system event sounds that Platform Builder uses when building a console application.

System event Description
Asterisk (*) The build has completed without errors or warnings.
Question mark (?) The build has completed with warnings.
Exclamation point (!) The build has completed with errors.

See Also

Platform Builder Tutorials | Creating a New Project | Preparing to Build a Project | Building a Project | Stopping a Build | Building Multiple Projects Using the Batch Build Command | Building a Selected Project | Building Selected Files

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.