Lars Uffmann wrote:
Okay, once again, I solved my own problem (partially):

In order to put the xerces include and library files where I want them, I simply copied the folders (to /usr/include/xerces-c and /usr/lib/xerces-c) and then I didn't have to supply an include path for the gcc compiler anymore because /usr/include/ is among the standard presettings. /usr/lib however isnt, I'll have to find out from where libraries are usually included.


Why not do:

runConfigure -p cygwin -c gcc -x g++ --prefix=/usr

then do a make install, like similar autoconf-built packages? I would recommend /usr/local instead of /usr, but that's really up to you.

One thing that really annoys me, however, is that the lib directory uses a shortcut linking to a shortcut linking to the real library for compatibility purposes. This is their naming:
libxerces-c.dll.a.lnk ->libxerces-c2_8_0.dll.a.lnk ->libxerces-c28.dll.a
libxerces-depdom.dll.a.lnk ->libxerces-depdom2_8_0.dll.a.lnk ->libxerces-depdom28.dll.a

Now those shortcuts seem to allow for the "simpler" library inclusion with g++ -lxerces-c and need to be edited if the libraries are copied to a new folder, because they link to absolute paths.

They're done that way because that's the way the Xerces-C links ELF binaries (for supporting binary-compatible upgrades), and that has carried over to the Cygwin build process.

And of course, $§%$§" Windows won't let me edit a shortcut to a shortcut - for whatever reason. Apart from that, those shortcuts might not be Windows-shortcut-compatible after all - the comment field holds the "native" linux-environment path to the link target, while the target has the windows path. Anyways, changing these shortcuts doesn't seem to work if I use the windows shortcut property-editing, so as for linker directives, I have to resort to -lcygxerces-c28 again :/

Working on this though :)

The Cygwin binaries are built to be run within the Cygwin environment, so the environment takes care of the symlinks, etc. If you really want to run Xerces-C binaries outside of Cygwin, you might try using Mingw, or just using the free version of Visual Studio.

Dave

Reply via email to