If a dll exports C functions, ld can link them directly also, because no name mangling is used.
xerces-c is a C++ library, or is there a C version also? C++ libraries, built by different compilers/linkers, mostly export different names. To avoid name mangling, a C bridge can be used:
#ifdef __cplusplus
extern "C"
{
#endif
//no name mangling here
#ifdef __cplusplus
}
#endif
If it's a VC dll, VC's import libs can be used by ld also. If you don't have VC's import lib, you can use
pexports (which is included in mingw-utils), to create a .def file and then use dlltool to create a .a file (MinGW import lib). Take a look at the
MinGW-FAQ also.