XML Binding Development Guide : PART II Code Generation Examples : Chapter 3 Basic Purchase Order Example : Building and Compiling
Building and Compiling
To build the generated classes, you may either add them to your own project or makefile, or use the project files or makefiles generated by HydraExpress.
This chapter presents the basic command line procedure for building and compiling the example, and the alternative procedure for Windows platforms based on using MSVC.
For a detailed discussion on building and compiling your HydraExpress applications, see Chapter 22, “Options for Compiling,” in the HydraExpress Web Service Development Guide.
Command Line Procedure
NOTE >> On UNIX/Linux, you must set your RWSF_HOME environment variable before using the makefiles. On Windows, be sure you have set up your environment properly and set up your command window with the MSVC environment. See Chapter 2, “Setup,” in the HydraExpress User Guide.
1. To build only the generated classes, go to the directory containing the generated output:
 
cd installdir\examples\xmlbinding\basic\basicExample
2. Invoke the following command:
Windows
nmake
UNIX
make
This command builds a release mode shared library that contains the generated classes.
3. To build the libraries and the sample application together, issue the nmake or make command and specify the sample po_main application target:
Windows
nmake po_main.exe
UNIX
make po_main
4. Change to the directory basicExample\bin, and run the po_main application at the command prompt, as shown here:
 
prompt> po_main
MSVC Procedure
NOTE >> You must set the RWSF_HOME environment variable in your system variables before starting MSVC.
1. Double-click on the MSVC solution file, basicExample.sln.
2. You have a choice of building only the generated classes, or of building the classes and compiling the example:
To build only the generated classes, select the po project and build it.
To also compile the example, select the po solution and build that.
To run the example from within MSVC, first make sure that the sample executable po_main is the active project, then:
in MSVC, press CTRL-F5 or select Debug|!Start without debugging