Try to avoid accidental use of wxXmlNode in XRC handlers.
Now that the handlers can be defined outside of the XRC library, we can't use wxXmlNode in them because this would create an (unsatisfied) link dependency on the xml library. To avoid this happening accidentally, don't include wx/xml/xml.h from the XRC header, unless building the xrc library itself. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,7 +29,17 @@
|
||||
#include "wx/animate.h"
|
||||
#include "wx/vector.h"
|
||||
|
||||
#include "wx/xml/xml.h"
|
||||
// We want to prevent the handlers defined outside of the XRC library from ever
|
||||
// using wxXmlNode directly as this would result in linking errors as the other
|
||||
// libraries don't link with the xml one (only xrc does). So do not include
|
||||
// this header unless building xrc itself (where a lot of code does use
|
||||
// wxXmlNode directly).
|
||||
#ifdef WXMAKINGDLL_XRC
|
||||
#include "wx/xml/xml.h"
|
||||
#else
|
||||
class WXDLLIMPEXP_FWD_XML wxXmlDocument;
|
||||
class WXDLLIMPEXP_FWD_XML wxXmlNode;
|
||||
#endif
|
||||
|
||||
#include "wx/xrc/xmlreshandler.h"
|
||||
|
||||
|
Reference in New Issue
Block a user