Earnie wrote: > I've been building libxml2-2.7.8 and have been having a heck of a > time getting xmlcatalog to work with a shared DLL library. I've > finally confirmed that the issue is caused by optimizations with -O2 > or -O1. If I use -O0 the issue goes away. The effect is the > xmlIsPubidChar_tab array is seen by xmlcatalog to contain all 0x00 > values. I'm using GCC-4.6.1 and binutils-2.21.53.20110804 as > delivered by MinGW. I wanted give this list a report of what I've > found in the event others come by, they may have already. >
The attached small patch resolves this issue. It was however suggested that XMLPUBVAR_DEF be created for the '__declspec(dllexport) extern' and XMLPUBVAR_DEF be used in the header fiel while XMLPUBVAR be used in the code. Since XMLPUBVAR isn't used in the code I chose the simpler patch. The patch also removes some warnings I was seeing during the build. -- Earnie -- https://sites.google.com/site/earnieboyd/
diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h index 9c6790c..c6516b4 100644 --- a/include/libxml/xmlexports.h +++ b/include/libxml/xmlexports.h @@ -115,7 +115,7 @@ */ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC) #define XMLPUBFUN __declspec(dllexport) - #define XMLPUBVAR __declspec(dllexport) + #define XMLPUBVAR __declspec(dllexport) extern #else #define XMLPUBFUN #if !defined(LIBXML_STATIC)
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org http://mail.gnome.org/mailman/listinfo/xml