GradC++ ToolBox: Administration Guide
DocumentId:GradSoft-AD-e-04.09.2000-v1.2.0
GradC++Toolbox is a joined package composed by several platform-independet components
designed to resolve standard widely-spread problem such as:
- -
- implementation of smart pointer templates;
- -
- parsing of the command line;
- -
- writing debug or info messages;
- -
- reading file directories;
- -
- starting and stopping of threads and so on.
We beg to propose this package for programm builders,
which want to save them from some standard problems
or need to produce portable sourse code for UNIX and for Windows NT.
This file describe a routine of obtaining, installing and using of version 1.6.3of package.
This version GradC++ToolBox 1.6.3 consists from following components:
- ptrs - set of smart pointer templates;
- ProgOptions - class for high-level handling of program options;
- Threading - set of classes to design of multithreading programs;
- Logger - class for logging support;
- DirectoryContainer - set of classes to read file directories;
- DynamicModules - component for shared libraries dynamic loading.
- ServiceOptions - specialization of ProgOptions for CORBA services;
You may install by choice:
- a whole set of package components;
- a set of all non-CORBA components which are (today) ptrs, ProgOptions, Logger, Threading, DirectoryContainer and DynamicModules.
Besides, by handle dependencies between some components, some single components can be installed too.
Current version of GradC++ToolBox is always avaible on builder's website: http://www.gradsoft.com.ua/eng
No payment if license is satisfied (see file license from delivery set).
GradC++ToolBox is designed and distributed by GradSoft company, GradSoft home page is: http://www.gradsoft.com.ua/eng
GradC++ToolBox is distributed in the form of source code,
its installation process consists from following steps:
- compilation of source code in user environment;
- coping of include files and libraries generated into directories defined by user.
You may:
- compile code;
- copy ("install") include files and libraries into directories defined by user;
- remove installed files ;
- remove automatically generated files (such as *.obj and *.lib)
using command make with options correspondent (see below for details).
- CORBA ORB (not needed, if you not use ServiceOptions):
- Unix: one of omniORB-3.0 or higher, TAO-1.1 or higher, ORBacus 4.0.1 or higher, MICO-2.3.9 or highter.
- WindowsNT: one of omniORB-3.0 or higher, TAO-1.2, ORBacus 4.0.1 or higher
- C++ compiler:
- Unix: gcc-2.95.2 or higher, SunProc C++ 6.2
- Windows NT: Microsoft Visual C v. 6.0 or higher.
- make:
- Unix: gnu make is necessary
- WindowsNT: nmake from MSVC++
- Make sure that necessary software are installed and are in working state.
- Extract files from archive Gen-1.6.3.tar.gz or Gen-1.6.3.zip in some catalog. Let's name
this catalog
<project_root>
- cd to
<project_root>.
- Run configure with command
./configure [options]
(options list is accessible via command ./configure --help;
for example, you can set --prefix=<smth> option to set directory of installation
or --with-corba=<yes/no> option to set volume of compilation and installation).
- Start compilation process with command
gmake
- Become superuser.
- Run install process with command
gmake install
- For deinstallation you can use command
gmake uninstall
- Check, that all necessary software is installed and are in working state.
Requirements to use MSVC are
- Environment variables INCLUDE and LIB must be defined and must contain pathes
to MSVC include files and MSVC libraries correspondingly.
- location of nmake, cl and link utilities must be reflected
in the environment variable PATH.
- Extract files from archive Gen-1.6.3.tar.gz or Gen-1.6.3.zip in some directory
(let's name of this catalogue
<project_root>).
- Edit file environment.nt.mak in directory
<project_root>\config\Win32
and, in the case you want to use ServiceOptions,
analogous file environment.nt.mak in directory
<project_root>\CORBA\config\Win32;
set values of next nmake variables:
<project_root>\config\Win32\environment.nt.mak:
- INSTALL_DIR (installation root) - include files and libraries supplied
will be quartered in subdirectories install/GradSoft and lib
of this directory.
<project_root>\CORBA\config\Win32\environment.nt.mak:
- ORB (the "name" of ORB) - it must be ORBacus, or OmniORB, or TAO
in concordance with ORB used
- ACE_ROOT - ACE root (in the case of using TAO as the ORB)
- TAO_ROOT - TAO root (in the case of TAO is placed outside of ACE directory tree)
- OMNI_ROOT - omniORB root (in the case of using omniORB)
- OOC_ROOT - ORBacus root (in the case of using ORBacus)
- MICO_ROOT - MICO root (in the case of using MICO)
- PTREADS_ROOT - location of pthreads-win32 source distributive (in the case of using MICO)
To compile package go to <project_root> and type make build
if you want to compile no CORBA components,
or make with-corba build if you want to compile ServiceOptions too.
To install include files and libraries go to <project_root>
and type make install
if you want to install no CORBA components,
or make with-corba install if you want to install ServiceOptions too.
To uninstall installed files go to directory <project_root> and type
make uninstall or make with-corba uninstall respectively.
To remove automatically generated files, such as *.obj, *.exe and *.lib,
from <project_root> and its subdirs go to directory <project_root> and type
make clean or make with-corba clean respectively.
For compilation, installation, deinstallation or cleaning of single (apart) subpackage move over
to directory suitable (one of next:
<project_root>\ProgOptions
<project_root>\CORBA\ServiceOptions
<project_root>\ptrs
<project_root>\Threading
<project_root>\Logger
<project_root>\DynamicModules
<project_root>\DirectoryContainer )
and use command make with options build, install, uninstall and clean correspondingly
Using make install without compilation of the package
leads to compilation of libraries will be started automatically
but test examples will not be compiled.
Demo examples, included in GradC++ToolBox,
are related to using examples in Programmers Guides for each package commponent.
It is necesorry to compile project before starting demos.
- Read ProgrammingGuide in file
<project_root>/ProgOption/docs/ProgrammingGuide_eng.pdf
- cd to directory
<project_root>/ProgOptions/demo
- run ProgOptionsDemo few times with next options:
--help
--qqq
--zzz
--zzz <something>
--zz1 <something>
--zz3
<something>
--config config.ini
- check, that program output is expected
- Read ProgrammingGuide in file
<project_root>/CORBA/ServiceOptions/docs/ProgrammingGuide_eng.pdf
- Go to directory
<project_root>/CORBA/ServiceOptions/demo
- For UNIX: make tests, thereto:
- call ./configure with options appropriate
- call gmake (or gmake build)
- Start HelloWorldServer with option
--help; read help message.
- Start HelloWorldServer with option
--ior-stdout;
make sure that Interoperable Object Reference is displayed on standard output
- Start HelloWorldServer with options:
--ior-file-HelloService hello.ref
Make sure that Interoperable Object Reference is placed into file hello.ref
- Start HelloWorldServer with options:
-OAport 1100 if you use ORBacus
-ORBport 1100 if you use TAO-1.1
-ORBEndpoint iiop://:1100 if you use TAO-1.2
-ORBpoa_iiop_port 1100 if you use omniORB
-ORBIIOPAddr=inte:<hostname>:1100 if you use MICO
(note port 1100 must be not busy by some other application; of course, you can
use any port number instead 1100)
- Start HelloWorldClient with options:
- if you use omniORB3 or TAO 1.2 or ORBacus 4.x :
-ORBInitRef HelloService=corbaloc::127.0.0.1:1100/HelloService
- if you use TAO-1.1:
-ORBInitRef HelloService=iiop://127.0.0.1:1100/HelloService
- Make sure that string "Hello World" is printed on you terminal
- Check you NameService daemon
- Start program HelloWorldServer with option
--with-naming
- Start HelloWorldClient with option
--with-naming
- Make sure that string "Hello World" is printed on you terminal
- Read ProgrammingGuide in file
<project_root>/Logger/docs/ProgrammingGuide_eng.pdf
- Move out to directory
<project_root>/Logger/demo
- Run demo executable
- Make sure that file.log is generated and its content correspond with usage rules
described in programming Guide.
- Read ProgrammingGuide in file
<project_root>/DirectoryContainer/docs/ProgrammingGuide_eng.pdf
- Move out to directory
<project_root>/DirectoryContainer/demo
- Run demo executable
- Make sure that file.log is generated and its content correspond with usage rules
described in programming Guide.
- Read ProgrammingGuide in file
<project_root>/ptrs/docs/ProgrammingGuide_eng.pdf
Move out in series to:
project_root/ptrs/demo/safe_ptr
project_root/ptrs/demo/owned_ptr
- Make sure that executable files is present and is in working state.
Move out in series to:
project_root/Threading/demo/Container
project_root/Threading/demo/DeleteThis
project_root/Threading/demo/Hairdresser
project_root/Threading/demo/Philosophs
project_root/Threading/demo/Stres
project_root/Threading/demo/ThreadServices
Make sure that executable files is present and is in working state.
- Read ProgrammingGuide in file
<project_root>/DynamicModules/docs/ProgrammingGuide_eng.pdf
- Move out to directory
<project_root>/DynamicModules/demo
- Run Hello executable
- Make sure that output is:
Hi! I'm Hello1
Hi! I'm Hello2, name was xxx
Windows NT:
WIN32 macros must be defined befor including of any include file from GradC++ToolBox package
Programs, which use some of GradC++ToolBox components must be compiled with the next libraries:
For Unix:
| component |
staic library |
| |
dinamic library |
| ProgOptions |
libProgOptions.a |
| |
libProgOptions.so |
| ServiceOptions |
libServiceOptions.a, libProgOptions.a |
| |
libServiceOptions.so, libProgOptions.so |
| Threading |
libThreading.a |
| |
libThreading.so |
| Logger |
libLogger.a, libThreading.a |
| |
libLogger.so, libThreading.so |
| DirectoryContainer |
libDirectoryContainer.a, libThreading.a |
| |
libDirectoryContainer.so, libThreading.so |
| DynamicModules |
libDynamicModules.a |
| |
libDynamicModules.so |
For Windows NT:
| component |
staic library |
| ProgOptions |
ProgOptions.lib |
| ServiceOptions |
ServiceOptions.lib, ProgOptions.lib |
| Threading |
Threading.lib |
| Logger |
Logger.lib, Threading.lib |
| DirectoryContainer |
DirectoryContainer.lib |
| DynamicModules |
DynamicModules.lib |
Take into account if want to treat single component of package:
- Compile ProgOptions before ServiceOptions
- Compile Threading before Logger and DirectoryContainer
- configure ptrs before compiling threading.
I. e. dependency diagram is shown in next picture:
ptrs ProgOptions
| |
*-- Threading *--ServiceOptions
|
|
*--Logger
|
*--DirectoryContainer
- 07.05.2003
- release number changed (1.6.0 -> 1.6.3)
- added information about MICO.
- 29.08.2002
- release number changed (1.5.0 -> 1.6.0)
- version of supported Sun CC compiler changed.
- 28.04.2002
- release number changed (1.4.2 -> 1.5.0)
- reflected adding of
ptrs component.
- added dependency diagram.
- 06.02.2002
- - release number changed (1.4.1 -> 1.4.2)
- 24.01.2002
- - release number changed (1.4.0 -> 1.4.1)
- 27.12.2001
- - overpatching reflecting next stuffs:
- alteration of installation process for Windows NT;
- adding of omniORB and TAO support for Windows NT;
- adding new component DynamicModules.
- 18.09.2001
- - added info about DirectoryContainer component
- 04.07.2001
- - changed port number in CORBA demo explanation.
- 29.04.2001
- - fixed few minor typos.
- 14.02.2001
- - added detailed information about ORB configuration options
- 04.09.2000
- - first revision
GradSoft