[xsd-users] Building windows binaries from linux using mingw64
Boris Kolpackov
boris at codesynthesis.com
Thu Mar 21 08:33:09 EDT 2013
Hi Lukas,
Lukas Kall <lukas.kall at gmail.com> writes:
> I am scouting around for a way to build 64-bit windows binaries of a
> software that we are developing under linux that make use of
> CodeSynthesis-XSD. Optimally I would like to have an automated build
> script that we could run on a linux box. Maybe one could use Vagrant
> or similar. I have noted that Fedora have a set of prebuilt libraries
> for mingw64, however not xerces-c, at least not in 64-bit version --
> so I have to compile that one myself.
So you want to cross-compile an XSD-based application from Linux to
64-bit Windows, presumably using the MinGW-w64 toolchain. I think
that shouldn't be too hard:
1. For XSD itself use the Linux binary package. The generated code is
the same on all platforms and the runtime library (libxsd) is header-
only.
2. Cross-compiling Xerces-C++ should be straightforward since it
uses autotools. Something along these lines should do the trick:
./configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 \
CXXFLAGS=-m64 LDFLAGS="-m64 -no-undefined"
make
The -m64 flag is only necessary if your toolchain supports multiple
targets (i.e., 32 and 64 bit).
Once this is done, you should be ready to build your application.
Boris
More information about the xsd-users
mailing list