diff --git a/contrib/include/wx/xrc/xmlres.h b/contrib/include/wx/xrc/xmlres.h
index 61247013fa..32f45bcd01 100644
--- a/contrib/include/wx/xrc/xmlres.h
+++ b/contrib/include/wx/xrc/xmlres.h
@@ -198,7 +198,7 @@ private:
// Global instance of resource class. For your convenience.
-extern wxXmlResource *wxTheXmlResource;
+extern WXXMLDLLEXPORT wxXmlResource *wxTheXmlResource;
// This macro translates string identifier (as used in XML resource,
// e.g. ) to integer id that is needed by
diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h
index 61247013fa..32f45bcd01 100644
--- a/include/wx/xrc/xmlres.h
+++ b/include/wx/xrc/xmlres.h
@@ -198,7 +198,7 @@ private:
// Global instance of resource class. For your convenience.
-extern wxXmlResource *wxTheXmlResource;
+extern WXXMLDLLEXPORT wxXmlResource *wxTheXmlResource;
// This macro translates string identifier (as used in XML resource,
// e.g. ) to integer id that is needed by