Preconditions for all examples
==============================

With the developemnt kit we will provide a collection of C++ and Java exmaples
which should introduce the user with the UNO component technology and the Office
API. For building the examples you will need:

- A java development or runtime environment (jdk1.3, java1.3 or higher)
- GNU make version 1.79.1 or higher
  GNU make is available from http://www.gnu.org, it can be ftped via ftp://ftp.gnu.org/gnu/make
- Microsoft Visual C++ 6.0 or higher
  Sun Workshop 6 update 1 C++ 5.2 2000/09/11 or higher
  GNU Compiler gcc version 2.95.2 or higher

Some headers ( e.g. cppuhelper/interfacecontainer.h ) can only be used with the STLport 4.0,
which is freely available from http://www.stlport.org . However, all examples can be built without
STL.

Make sure, the gnu-make-executable and java is included in your PATH variable.

Each example has its own GNU makefile which will build the example for a number of  platforms/
compilers. The platform that you are building on and the compiler you are using needs to be
specified when running make. This bypasses the need for an automated configuration process which
would have to deduce your platform and compiler automatically. It also means that you can specify
a certain compiler to use if you have more than one installed on your machine (for example gcc or
Sun Workshop compiler on Solaris).

Currently three platform/compiler options are supported. These are Solaris/Sun Workshop compiler,
Linux/gcc and Win32/Microsoft Compiler. Support for additional  platforms/compilers can be easily
added by writing a platform/compiler dependent settings makefile and adding a target in the main
makefile. The settings makefiles are located in the settings directory of the development kit.

We use this options also for the java examples because in the settings are platform dependent stuff
which is also important for building the java examples.

Below is a list of the platform dependent variables set in the settings makefiles.
These settings makefiles can be found in the settings directory in the root of the development kit.

OS=The operating system e.g. LINUX, WIN etc.

PS=The path separator. Backslash on Windows, forward slash on Unix systems.

CC                 = Name of the compiler command e.g. CC, gcc, cl
LINK               = Name of the linker command. Mostly the same as the compiler command.
LIB                = The library creator command. Mostly the same as the compiler command.
ECHO               = The command to echo text to the screen for messages etc.
MKDIR              = The command to create a new directory.
CAT                = The command to return the contents of a file.
OBJ_EXT            = The file extension for an object file e.g. .o or .obj
SHAREDLIB_EXT      = Shared library file extension e.g. .so or .dll
SHAREDLIB_PRE      = The shared library name prefix.  On Unix systems all shared  library
                     file names start with lib.
SALLIB             = The name of the sal shared library as referenced in an argument to the
                     compiler/linker e.g. -lsal3. The sal shared library is located in the
                     library directory of the UDK toolkit on Unix systems and in the bin
                     directory on Windows.
CPPULIB            = Same as above but for the cppu shared library.
CPPUHELPERLIB      = Same as above but for the cppuhelper shared library.
CC_FLAGS           = The compiler flags.
CC_INCLUDES        = The include arguments for the compiler command line.
CC_DEFINES         = The defines for the compiler command line.
CC_OUTPUT_SWITCH   = The compiler switch to denote the output file. Usually -o
LIBRARY_LINK_FLAGS = The linker flags when linking a library.
EXE_LINK_FLAGS     = The linker flags when linking an executable.
LINK_LIBS          = The include arguments for the linker command line.

A settings makefile may also have other platform/compiler specific variables set.

The PATH environment variable must contain the path to the compiler/linker before running the
makefile. For example, if you were compiling for gcc, your PATH variable must be set so that the
system can find the gcc command.

On Unix systems the LD_LIBRARY_PATH variable and on Windows the LIB variable must include paths to
the development kit lib directory and (when running the examples) the output trees lib directory.  
If you are getting  errors due to libraries or files not being  found it is most likely to be due 
to these executable and library these include paths not being set correctly.

The makefiles for the examples create an output tree in the top level directory of the development
kit called ($OS)example.out (e.g. WINexample.out, LINUXexample.out etc.).


Example instructions for building one of the examples on Linux using the gcc compiler:

1.Read the README file in the example directory for example specific information.

2.Set the PATH environment variable and the LD_LIBRARY_PATH (or LIB on Windows) environment variable
to the correct paths (see above).

3.Type make and you will see a list of the target platforms/compilers. Type make linux_gcc 
(if building on Linux with gcc) and the build process will begin.


For additional information about the examples themself please have a look in the
README of the appropriate example directory.
