Compile Opensync for Windows
This page describes the basic steps for building OpenSync? for Win32/XP based on the cygwin environment If you need any help with this please refer to Cygwin homepage.
After installing cygwin, you need the same libraries the Linux builds are using. Either they will be available from cygwin as an (optional) install, or you can built them from the Linux sources (either by starting from configure or , if required, autoconf)
Some of the configure scripts rely on pkg_config to find your libraries. This works better if you add /usr/local/lib to your PKG_CONFIG_PATH.
a typical cygwin install looks like this:
autoconf
./configure --disable-unit-tests --enable-shared=yes --enable-static=no
make
make install
There are only very minor fixes to the source required to make this work.
Specifically: ./formats/vformats-xml/vformat.c lines 211 and 236 need a cast: (const char* *) in front of &inbuf.
The plugins will be compiled to static libraries (.a extension).
You need to manually invoke gcc with the -shared option and the list of required (import) libraries to generate a win32 dll.
Then manually copy this dll into the /usr/local/lib/opensync/plugins or formats directory, changing the extension to ".so".
At this moment, the file-sync plugin is up and running on XP, syncml and sunbird will be the next to try. Currently, the plugins are still containing some common statically linked code, but it should be possible to turn that into a dll.
