Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Evaluating SourcePro C++
Rogue Wave web site:  Home Page  |  Main Documentation Page

3.2 Building the Examples

The examples for each library are located in the <buildspace>\examples\<mnemonic> directory:

For instance, the examples for the Threads Module are located in a subdirectory under <buildspace>\examples\thread.

3.2.1 Building from the Command Line

The installation program places makefiles in the <buildspace>\examples\<module>\12d directory within the examples directory for each library.

The provided makefiles contain the necessary include paths, link libraries, and compiler flags for each example.

3.2.1.1 Windows

  1. Open a command prompt window.

  2. Ensure that the environment variables lib and include are set for the Microsoft Visual C++ compiler. If not, run vcvars32.bat, located in the bin subdirectory of your compiler installation. For more information, see the MSVC documentation.

  3. Change to the 12d subdirectory below the examples you want to build.

  4. Type nmake. The program looks in the current directory and executes the commands found in the makefile.

For instance, to build the examples for the Essential Tools Module on Windows, type nmake in the <buildspace>\examples\tools\12d directory.

3.2.1.2 UNIX

  1. Verify that the supported compiler for your platform is working as your compiler. If not, set your environment for the supported compiler.

  2. Within your SourcePro C++ Evaluation installation, change to the 12d directory below the examples you want to build.

  3. Type make. The program looks in the current directory and executes the commands found in the makefile.

For instance, to build the examples for the Essential Tools Module on UNIX, type make in the <buildspace>/examples/tools/12d directory.

3.2.2 Building from Microsoft Visual Studio

Below are instructions for setting up a project in Microsoft Visual Studio to build and run the examples. You can also use this for guidance in setting up a project for your own application that depends on SourcePro C++ libraries.

  1. Open Visual Studio and select File | New | Project.

  2. Select Win32 Console Application, give the project a name, and click OK.

    The Win32 Application Wizard appears.

  3. Click Next.

  4. In Application Settings, select the Empty Project option and click Finish.

  5. In the Solution Explorer, right click on Source and select Add | Existing Item.

  6. Navigate to and add the source code for the examples you are interested in.

  7. Again, in the Solution Explorer, right click on Source and select Add | Existing Item.

  8. Navigate to and add the library files the examples depend on.

    If you are uncertain what these are, look in the makefiles for the examples you want to build. For example, to build the Essential Tools Module tutorial examples, look in <installdir>\examples\tools\tutorial\12d\makefile. The REQLIBS entry specifies all required libraries.

  9. In the Solution Explorer, right click on the project and choose Properties.

  10. Under VC++ Directories, edit the Executable Directories to contain the path to the DLL files.

    If the buildspace is located at c:\RogueWave\SourcePro\12.0_eval, the additional executable path needed is c:\RogueWave\SourcePro\12.0_eval\lib.

  11. Edit the Include Directories to contain the path to the rw directory.

    If the buildspace is located at c:\RogueWave\SourcePro\12.0_eval, the additional include path needed is c:\RogueWave\SourcePro\12.0_eval.

  12. Expand the C/C++ section.

  13. Select Proprocessor and edit the Preprocessor Definitions to add _RWCONFIG=12d.

  14. Select Precompiled Headers | Precompiled Header and from the dropdown list for this item, select Not Using Precompiled Headers.

  15. Click OK.

Your project is now set up to compile and run the examples you have selected.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.