Found it!
To build a compatibility version of libxerces-c-3.1.dylib:
Download and expand the Xerces 3.1 source tarball from http://xerces.apache.org/xerces-c/download.cgi
from the resulting directory run the configure script using the following options: ./configure --enable-netaccessor-socket CFLAGS="-arch x86_64 -mmacosx-version-min=10.5" CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.5"
Switch to the
src
directoryRun
make
libxerces-c-3.1.dylib
can be found under.../src/.libs/
and (at least for my application) should be copied to/usr/local/lib/
I tested this by compiling a version of libxerces-c-3.1.dylib
under OSX 10.8.4 using the command line tools from Xcode 4.6.3. I was then able to use the result under 10.6, 10.7, and 10.8 (all the versions I had available). The solution required two changes to the Xerces configuration settings:
Specifying a minimum osx compatibility version. I chose 10.5, but have only been able to test back to 10.6
Using an alternative to curl for internet access. Specifically using the "sockets" netaccessor seems to work. This was necessary since the version of libcurl.4.dylib included with 10.6 only supports up to 6.0.0, but the version expected when built on a newer system is 7.0.0. For other options see the net accessor table from: the xerces-c build guide