Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 5 Using the Example Code : Building the Examples

Building the Examples
The following sections describe how to build the TIBCO ActiveSpaces examples for each API set:
Building the Java API Examples
The Java examples are provided in the AS_HOME/examples/java directory. To facilitate building the Java examples, a build.xml file for use with Apache Ant is provided.
See http://ant.apache.org for more information on using Apache Ant for building Java applications.
Complete these steps to build the Java examples:
1.
Ensure that the /bin directory for ant is in your path.
2.
cd AS_HOME/examples/java
3.
ant
The Java compiler compiles the examples and two jar files are created:
Examples.jar contains the class files for all of the examples except for ASPaint
ASPaint.jar contains the class files for only the ASPaint example.
Building The C API Examples
The C examples are provided in the AS_HOME/examples/c directory. Makefiles are provided for the platform you are installing on.
Building the C Examples on Windows
For the Windows platform, TIBCO ActiveSpaces provides a Makefile that works with Microsoft Visual C++.
Complete these steps to build the C examples:
1.
Ensure the AS_HOME environment variable has been set to the location where TIBCO ActiveSpaces has been installed.
2.
Ensure the TIBRV_HOME environment variable has been set to the location where TIBCO Rendezvous has been installed.
 
3.
set VCINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
"%VCINSTALLDIR%"\vcvarsall.bat x86_amd64
4.
cd AS_HOME/examples/c
nmake
The compiler generates executable files for the example programs.
Building the C Examples on Non-Windows Platforms
For platforms other than MS Windows, two makefiles are provided:
Makefile.mk is included by the makefile file, and contains platform and compiler settings for the target platform.
To build the C examples on a non-Windows platform:
1.
Edit the settings in the Makefile.mk file as required.
2.
Run your compiler against the makefile to generate the example code.
Building the .NET API Examples
The .NET API examples can be found in the AS_HOME/examples/dotnet directory. To facilitate building the .NET examples, the file build.cmd is provided. A Microsoft Visual Studio solutions file is also provided.
This section describes the following tasks:
Building the .NET Examples from the Windows Command Line
Complete these steps to build the examples from a Windows command window:
1.
Ensure that the AS_HOME environment variable is set to the TIBCO ActiveSpaces installation directory.
For example:
set AS_HOME=c:\tibco\as\2.0
2.
For example, on a Windows 7 64-bit machine with Visual Studio 2010, execute the following commands:
set VCINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
"%VCINSTALLDIR%"\vcvarsall.bat x86_amd64
3.
Ensure that AS_HOME/lib/TIBCO.ActiveSpaces.Common.dll has been installed into your Global Assembly Cache (GAC).
4.
If TIBCO.ActiveSpaces.Common.dll is not present in your GAC, enter the following:
cd AS_HOME/lib
gacutil -i TIBCO.ActiveSpaces.Common.dll
5.
cd AS_HOME/examples/dotnet
build.cmd
 
/platform:x86
csc /r:%AS_HOME%\lib\TIBCO.ActiveSpaces.Common.dll /platform:x86 ASOperations.cs ASExampleBase.cs
Building the .NET Examples from MS Visual Studio
The ActiveSpaces installation provides a Visual Studio solutions file for building the .NET examples.
Complete these steps to build the examples using MS Visual Studio:
1.
Ensure that the AS_HOME environment variable has been set to the TIBCO ActiveSpaces installation directory.
For example:
set AS_HOME=c:\tibco\as\2.0
2.
Ensure that AS_HOME/lib/TIBCO.ActiveSpaces.Common.dll has been installed into your Global Assembly Cache.
3.
If TIBCO.ActiveSpaces.Common.dll is not present in your GAC, do the following:
cd AS_HOME/lib
gacutil -i TIBCO.ActiveSpaces.Common.dll
4.
cd AS_HOME/examples/dotnet
Examples.sln
5.
In Visual Studio, right click on Solution Examples and select Build Solution.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved