Creating a Project (Windows CE 5.0)

After you create an OS design, you can modify it by adding or subtracting projects. A project is a collection of files whose functions implement Catalog item functionality in a Windows Embedded OS.

A workspace contains all files that make up a run-time image, including projects that you add. All projects in a workspace must be associated with an OS design that is later used to build a run-time image.

In Platform Builder you can use a project wizard to create a project, which is given an associated Platform Builder project (.pbpxml) file name extension. A .pbpxml file is an XML file that serves as a thin layer extension for information contained in the associated sources files about a project.

In Microsoft® Windows® CE, information about projects, including source code filenames and locations, is contained in sources and dirs files. For information about these file types, see Sources File and Dirs File.

This system allows the user to define specific build settings in the integrated development environment (IDE) while maintaining the functionality of the IDE as a thin client for the underlying build system.

You can create the following types of projects in Platform Builder, and select whether they are created in a workspace, or in the OS tree:

  • Applications
  • Dynamic-link libraries (DLLs)
  • Static libraries
  • Transport layers

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

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

Samples, header files, and library files are in the %_WINCEROOT%\Others\MFC and %_WINCEROOT%\Others\ATL directories.

After these projects are created, you can use Platform Builder to add them to your OS design.

Creating a Project

When you create a project using the New Project Wizard in Platform Builder, you must select a specific project type and specify whether it is created in a workspace or in the OS tree. You must also specify whether it is created as a workspace project or a sources project.

The options provided by the wizard vary, depending on the type of project you create.

If you create a project in a workspace, the project is built only in the context of that specific workspace. This is the only difference between these and projects that are created in an OS tree.

Projects created in the OS tree do not depend on workspaces, so these projects are built every time the part of the OS tree they are in undergoes a build.

The following table shows the available project types.

Project type Description
WCE Application One of the following types:
  • An empty project
  • A Windows CE–based application
  • A Windows CE–based Hello World application
WCE Console Application An application that runs in a console window.
WCE Dynamic-Link Library One of the following types:
  • An empty Windows CE DLL
  • A simple Windows CE DLL
  • A DLL that exports symbols
WCE Static Library A Windows CE static library.
WCE Transport Layer A project for a device-side transport layer. To export a custom SDK, create a custom 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.

WCE DIRS Project A Windows CE dirs file. You cannot associate this type with a workspace.

For most projects that you create using the wizard, the wizard generates a set of source files that implement the basic functionality of your project when compiled. These files include the following:

  • Source and header files for your project
  • A text file that describes the contents of the starter files
  • Sources files that describe the files in your project

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) file
  • A dirs file

During project creation, the wizard provides options for customizing the source files.

After project creation, you can view the project files in the Workspace window by choosing the FileView tab.

Building a Project

With Platform Builder you can build selected projects. 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 during a build.

Before building a project, you choose the active OS design, which determines which set of build options is used. For example, the selected build options in a release configuration differ from the options selected in a debugging configuration.

For information about build options that you can select, see Build Project Menu Options.

If, while building a project, Platform Builder determines that the 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
  • 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 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 might need to perform debugging after the build is completed.

When the build process is complete, Platform Builder 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, shown in the following table.

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

See Also

Platform Builder Tutorials | Creating a New Project | Preparing to Build a Project | Building a Project | Stopping a Build | Building a Selected Project | Sysgen Tool

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.