aboutsummaryrefslogtreecommitdiff
path: root/dist/INSTALL
blob: 883979469d07487bb430dfba7152f72a1eb2479b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
This file contains instructions for building the XSD/e runtime
library (libxsde) and examples. The XSD/e compiler itself was
pre-built for your host development platform and can be found
in the bin/ directory. The runtime library and examples can be
built using either GNU make (normally on UNIX operating systems)
or Microsoft nmake (on Windows). The following sections describe
each of the two methods.


GNU make
--------

This section provides general instructions for building the XSD/e
runtime and examples with GNU make. For additional information on
building for iPhone/iOS, Android NDK, and Symbian SDK see the
corresponding notes at the end of this document.

The first step in building the source code with GNU make is to
configure the runtime library by editing the config/config.make
file. There you can specify which toolchain should be used to
compile the source code as well as which optional feature (such
as STL, C++ exceptions, etc.) should be used. Follow the
instructions in the comments in config/config.make and make the
appropriate changes. The etc/ directory contains a number of
sample configurations for various targets/toolchains.

To start the compilation process simply execute make (or gmake)
in the root directory. This will build the libxsde.a runtime
library as well as the examples. If you do not want to build
the examples, you can start the compilation process from the
libxsde/ directory. Note that if you change any configuration
parameters in the config/config.make file, then you need to
completely clean the distribution before recompiling. For that
run 'make clean' from the root directory.

In order to start using XSD/e in your applications, you will
need add the libxsde/ directory to your include search paths
(-I) and link your executables with the libxsde/xsde/libxsde.a
library.

You can also install the XSD/e compiler as well as the XSD/e
runtime headers and library by running 'make install'. By
default the installation directory is /usr/local but this
can be changed with the 'install_*' command line variables.
By default they have the following values:

install_prefix  = /usr/local
install_bin     = install_prefix/bin
install_man     = install_prefix/man
install_lib     = install_prefix/lib
install_include = install_prefix/include

For example, to install XSD/e into /usr with the XSD/e runtime
library in /usr/lib64, you can use the following command line:

make install install_prefix=/usr install_lib=/usr/lib64


Microsoft nmake
---------------

This section provides general instructions for building the XSD/e
runtime and examples with nmake. For additional information on
eMbedded Visual C++ 4.0, Visual Studio 2005 with Smart Devices,
and Visual Studio 2008 with Smart Devices support see the
corresponding notes at the end of this document.

The first step in building the source code with nmake is to
configure the runtime library by editing the config\config.nmake
file. There you can specify which toolchain should be used to
compile the source code as well as which optional feature (such
as STL, C++ exceptions, etc.) should be used. Follow the
instructions in the comments in config\config.nmake and make the
appropriate changes. The etc/ directory contains a number of
sample configurations for various targets/toolchains.

If you are using an IDE (e.g., Visual Studio, eMbedded Visual C++,
or Rational Rhapsody) to develop your applications, you can copy
the compiler options (such as C++ language features, CPU and
Platform preprocessor macros, etc.) from your project's C++
compiler settings. In particular, you need to make sure the
CFLAGS and CXXFLAGS variables in config.nmake contain the same
runtime option (one of /MD, /MDd, /ML, /MLd, /MT, /MTd) as your
application. A common symptom of using different runtime options
when building the XSD/e runtime library (xsde.lib) and your
application is a large number of link errors related to undefined
or redefined symbols.

The next step is to start a new command prompt and execute
the vcvars32.bat (or equivalent) file that is normally found
in your development environment's installation directory.
After executing vcvars32.bat, you can start the compilation
process by executing

nmake /f nmakefile

from the XSD/e root directory. This will build the xsde.lib
runtime library as well as the examples. If you do not want to
build the examples, you can start the compilation process from
the libxsde\ directory. Note that if you change any configuration
parameters in the config\config.nmake file, then you need to
completely clean the distribution before recompiling. For that
run 'nmake /f nmakefile clean' from the root directory.

In order to start using XSD/e in your applications, you will
need add the libxsde\ directory to your include search paths
and link your executables with the libxsde\xsde\xsde.lib
library.


Notes on XCode and iPhone/iOS SDK
---------------------------------

You can find sample configuration files for iPhone/iOS in the
etc/ios/ directory. The accompanying README file provides step-by-
step instructions on how to use XSD/e with iOS.


Notes on Android NDK
--------------------

You can find a sample configuration file as well as the Android NDK
makefiles in the etc/android/ directory. The accompanying README
file provides step-by-step instructions on how to use XSD/e with
Android.

Notes on Symbian SDK
--------------------

You can find sample configuration files for Symbian SDK in the
etc/symbian/ directory. The accompanying README file provides
step-by-step instructions on how to use XSD/e with Symbian.


Notes on eMbedded Visual C++ 4.0
--------------------------------

You can find a sample configuration file for this development
environment in the etc\evc-4.0\ directory.

Instead of one vcvars32.bat file, eMbedded Visual C++ has a set
of such files each for a particular platform and CPU. They can be
found in the EVC\WCEnnn\BIN\ subdirectory in the eMbedded Visual
C++ installation directory. For example, a file for Windows CE
4.0 for ARMv4 CPU is EVC\WCE400\BIN\WCEARMV4.bat. You may want
to review the installation paths in this file to make sure they
reflect your setup. You can also study this file to find out the
name of the C/C++ compiler for this CPU. In case of ARM, it is
clarm.exe.


Notes on Visual Studio 2005 with Smart Devices support
------------------------------------------------------

You can find sample configuration files for this development
environment in the etc\vc-8.0\ directory.

This version of Visual Studio does not provide vcvars32.bat or
equivalent for Smart Devices development. Instead you can use
the vcvarssd.bat file provided in the etc\vc-8.0\ directory.
Modify it according to your setup as instructed by the comments
found in this file.


Notes on Visual Studio 2008 with Smart Devices support
------------------------------------------------------

You can find sample configuration files for this development
environment in the etc\vc-9.0\ directory.

This version of Visual Studio does not provide vcvars32.bat or
equivalent for Smart Devices development. Instead you can use
the vcvarssd.bat file provided in the etc\vc-9.0\ directory.
Modify it according to your setup as instructed by the comments
found in this file.