CORBA 2.6.1 Programmer's Guide for C++

The OSS run command lets you run a process with specific attributes. For example, you could use the following syntax to run a named process:
run -name=Guardian-process-name program-name
For example,
run -name=/G/svr Test_DII_SVR -ORBprofile tcp_sample_svr
In this example, svr is an arbitrary process name. tcp_sample_svr is passed when ORB_init() is called.
OSS Environment Variables and the env.sh File
A shell implements environment variables that you can set and display. Processes started from the OSS shell can access exported environment
variables. For example, NonStop CORBA processes and utilities use environment variables when you configure the system, develop a
component, or run an application. The $NSD_ROOT/etc/env.sh file stores shell commands that set environment variables. The env.sh shell script
must be executed during shell initialization by using
.profile, or by using the dot (.) command to execute the env.sh shell script in the current
shell. If you log on only for NonStop CORBA work, it is often easier to set the environment variables using
.profile. However, if you use many
application environments, it may be easier to execute the
env.sh script.
A subset of the environment variables set in the
env.sh file are relevant for compiling and building NonStop CORBA applications:
> export NSD_ROOT=/usr/tandem/nsdoms
> export JAVA_HOME=/usr/tandem/java
> export JREHOME=$JAVA_HOME/jre
> export CLASSPATH=.:$NSD_ROOT/lib/jorb.jar:$NSD_ROOT/lib/jts.jar:$NSD_ROOT/lib/ejb.jar
> add_define =_SRL_01 class=map file=$NSD_SRL_SUBVOL.NSDSRL
> export CLASSPATH=.:NSD_ROOT/lib/jorb.jar:$NSD_ROOT/lib/jts.jar
> export PATH=”$PATH:$NSD_ROOT/bin:$COMP_ROOT/usr/lib:$JAVA_HOME/bin”
$NSD_ROOT designates the root directory where NonStop CORBA files reside. This guide sometimes refers to directory names relative to
$NSD_ROOT; in these cases, the notation $NSD_ROOT means your setting of the NSD_ROOT variable.
JAVA_HOME designates the root directory where NonStop Server for Java files reside. The jorb.jar and JTS.jar files reside in the $NSD_ROOT/lib
directory.
The
add_define sets a Guardian define from OSS to point to the NonStop CORBA SRL. Guardian uses this define to associate an executable
with an SRL when the executable runs.
CLASSPATH contains fully qualified names of all the jar files used by applications.
PATH specifies the order in which to search directories for a command typed at the osh prompt.
OSS Development and Debugging Tools
You use the following OSS commands and utilities to develop your application:
make
This utility helps you build and maintain an application that consists of multiple, interdependent modules. You use a file, called Makefile
by default, to describe the dependencies among program modules. Thereafter, when you modify a module on which other modules
depend, the make utility automatically initiates recompilation of the dependent modules. The NonStop CORBA sample programs use a
Makefile to perform all the steps for building and configuring applications: running the IDL compiler, compiling and linking application
programs.
c89
This utility is the front end for the C++ compiler. You can invoke c89 from within the make file.
nld
This utility is the native (TNS/R) linker. It links one or more TNS/R native object files to produce an executable or relinkable native object
file. You can run the
nld utility from either the Guardian or the OSS environment. c89 automatically invokes the nld utility. Therefore, in
most cases you need not use
nld explicitly when creating application executable files.
nm
The nm command writes the name list of each specified object file to the standard output file. The nm command displays symbolic
information appearing in an object file, executable file, or object-file library.
nm can be used to find symbols that show up in unresolved
external error messages.
noft
The noft utility reads and displays information from native object files. For example, the utility lets you list shared runtime library (SRL)
references or unresolved references in an object file. The
noft utility is very useful for developing and debugging NonStop CORBA C++
language programs. The
noft utility runs in both the Guardian and the OSS environment.
vi
This utility is the OSS editor used to create and update OSS files.
runv
OSS does not provide a native debugger. You use the Visual Inspect debugger to debug your NonStop CORBA application programs.
See the Open System Services Shell and Utilities Reference Manual and the online help for Visual Inspect for information on how to use
the tool.