XParam - General-Purpose Object Serialization Framework for C++
The XParam Library User's Guide
Installing XParam
Next: Usage Examples
Previous: The Registration Interface
Up: Table of Contents
Contents:
- Installation in Unix
- Installation in Windows
- Making Changes
- The XParam source files are available in the file
xparam-1.11.tar.gz.
Use tar zxvf xparam-1.11.tar.gz to uncompress and untar this file to
where you want it. We will assume you put the XParam files under
/usr/local/src/.
- The XParam files are under four main directories. Under lib
you will find the library itself. Under examples you will find
example programs using XParam. Under tests you will find
regression testing code. Under doc you will find the library's
html documentation, including this file.
- XParam uses autoconf. Run './configure' from the main directory to
create the library's Makefile, then run 'make install' from the
main directory to build the library and install it. (Using 'make' will
build the library, but will not install it.) 'make check' will run
regression testing. 'make examples' will compile the example code.
'make check' and 'make examples' will only work after the library is
installed.
- Set environment variable XPARAM_CLASSPATH to include all directories
where you want XParam to search for its '.xpn' files (separated by colons).
To run the example programs, you will need this path to include
/usr/local/src/xparam-1.11/examples/classpath (or the equivalent
to reach the examples/classpath subdirectory in the distribution, if
you untarred XParam in a directory other than /usr/local/src).
- The standard XParam installation places the file
libxparam.so under /usr/local/lib, the XParam header
files xparam.h and xparam_extend.h under /usr/local/include,
and the rest of XParam's include files (which are never used directly)
under /usr/local/include/xparam. Use the './configure' directive
'--disable-priv-includes' if you want to install all include files in the
same directory, or '--enable-priv-includes[=path]' to install the private
include files to a relative path other than 'xparam'.
- Use the './configure' directive '--disable-dynamic' if you wish to
have the dynamic loading feature disabled. This will only affect your
system if it has dynamic loading support. Otherwise, this feature will
be automatically disabled.
- Make sure that the directory where you installed the XParam library
is a trusted directory for loading shared objects. (See "man ldconfig"
for details.)
- You have now finished the installation of XParam. All
the usage instructions are in the doc library, including how to
run the programs under examples to verify that the installation
was successful.
- The XParam source files are available in the file
xparam-1.11.tar.gz.
Use WinZip or similar utility to uncompress and untar this file to
where you want it.
- The XParam files are under four main directories. Under lib
you will find the library itself. Under examples you will find
example programs using XParam. Under tests you will find
regression testing code. Under doc you will find the library's
html documentation, including this file.
- Load the workspace file xparam.dsw (for Visual C++ 6.0).
It contains all the projects and settings for compiling the XParam library
and examples with Visual C++ 6.0 - just run the build command on your
selected project.
When you want to create your own project using XParam, you should make the
following project settings:
- Turn on RTTI (Under the C/C++ tab, C++ Language category)
- Add the include directory for XParam's include files (Under the
C/C++ tab, Preprocessor category, Additional include
directories field). You should enter here the directory lib/xparam
in the XParam distribution.
- Link with the XParam library. To do this go to the Link tab,
input category. Add xparam.lib at the end of the field
Object/library modules, and add the path to the XParam library in the
Additional library path field
(If you've used the supplied project
settings to compile the library, this entry should be lib/bin
relative to the root of the XParam distribution).
- You have now finished the installation of XParam. All
the usage instructions are in the doc library, including how to
run the programs under examples to verify that the installation
was successful.
All that was said above refers to the library's ready-to-compile sources.
If you want to make changes in these sources, you should take the following
into account:
- The XParam parser and lexer were written using a parser generator called
ANTLR. The descriptions of the parser and lexer appear under directory
lib/meta_sources/*.g. In order to re-create the parser, you must
first install ANTLR. ANTLR is freeware, available from www.antlr.org.
ANTLR is
written in Java, so you must also have Java installed, in order to run it.
- Use lib/meta_sources/update_parsers.pl to run ANTLR, because
XParam has to tweak the ANTLR output before it can use the files.
- XParam's ready-to-compile version can handle constructors of only up
to 13 parameters. If you wish to exceed this limit,
simply run lib/meta_sources/ctor_code_gen.pl with the upper
limit you desire as a parameter. (See README.txt, in the same
directory for further details.)
- The .pl files in lib/meta_sources are Perl files.
In order to run them, you must have a Perl interpreter installed.
- If you write any patch, bug-fix or extension to XParam, make sure you
send us a copy. Simply diff your version with ours, and send
the resulting patch-file to the tracker at xparam.sourceforge.net.
Next: Usage Examples
Previous: The Registration Interface
Up: Table of Contents