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
  NOTE: Windows user can find an executable of gnu make under http://www.nextgeneration.dk/gnu/make.zip.
        It is not recommendable to use the Cygwin make because it don't work.
- 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 is detected automatically (using uname). The uname
command is normally not available under WINDOWS. So the default is when uname not exist or return
nothing that we will build for Win32 and using Micorsoft Complier.

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 a new section in the settings.mk file. The settings makefile is located in the settings
directory of the development kit.

We use GNU make also for the java examples because the Java examples also use the tools idlc,
regmerge, regcomp and javamaker to generate use defined types, register types or register the
new components.

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 the build process will begin.


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