Programming Tools:prgtools

Using a project file Foundation

Once a project file (XPJ) is created, it can be built and maintained by invoking pbuild.exe on the command line. In the following, typical usage scenarios involving XPJ files are outlined. For more details and a thorough explanation of the ProjectBuilder options used in the examples, please refer to the section Command line options for PBUILD.EXE .

Note: By default, the ProjectBuilder searches for a project file named project.xpj in the current directory. Also, a default extension of .xpj is assumed in case no extension is specified.

Typical usage scenarios with project files

Building the project

This recompiles only modified source files and creates the corresponding target(s).

1) // Building the project 
   pbuild               // (project.xpj) 
   pbuild customer      // (customer.xpj) 
   pbuild customer.xpj 

2) // Building a specific target 
   pbuild /t:myapp.exe  // (project.xpj) 
   pbuild customer.xpj /t:demo.dll 

Rebuild everything

This recompiles all source files and builds the respective target(s), regardless of whether changes have been made since the last build.

1) // Rebuilding all targets in a project 
   pbuild /a            // (project.xpj) 
   pbuild customer /a   // (customer.xpj) 

2) // Rebuilding everything in target myapp.exe 
   pbuild customer.xpj /t:myapp.exe /a 

Cleaning up

This removes all intermediate files as well as the target binaries. Sources and other files referenced in the project file are not affected.

1) // Cleaning up the whole project 
   pbuild /c   // (project.xpj) 

1) // Cleaning up a single target 
   pbuild customer.xpj /t:myapp.exe /c 

Rebulding dependencies

When sources files are added or removed to a project file, the dependenciies of the corresponding target(s) may have to be recomputed to ensure the ProjectBuilder correctly detects changes in and recompiles these files when the project is next rebuilt.

1) pbuild /g   // (project.xpj) 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.