Make sure that the preprocessor conditions and types for xmlDllMain match exactly in threads.h and threads.c.