← Back to team overview

kicad-developers team mailing list archive

Re: Compiling fails on XML class on Apple OS X with wxWidgets 2.9-svn

 

> Jerry,
>
> After you ran configure, what did configure report for the expat library "sys"
> or "builtin"?  On both Linux (Debian testing) and Windows (MinGW/MSYS) I'm
> using the system libraries without any issues.  I don't know that this makes
> any difference but it could.  Also, it may be the version of wxWidgets you are
> using.  I had to update from 2.8.10 to 2.8.11 because
> wxXmlNode::GetAttributes() does not exist prior to 2.8.11.  This may also apply
> between the 2.9.0 and the 2.9.1 branch.  You can verify this by grepping
> <wx/xml/xml.h> for GetAttributes.
>
> I've been toying with the idea of adding a version check to FindwxWidgets so
> CMake will choke if the correct version of wxWidgets is not available (ala
> autoconf) rather than having to figure that out after a build failure.  Library
> version checking is one of the places most of the CMake find modules are a bit
> weak.  If no one objects to this idea, I'll add it to my todo list and try to
> knock it out in the not too distant future.
>
> Note to all developers: the current minimum version of wxWidgets to build the
> testing branch of Kicad is 2.8.11.
>
> Wayne
>   

Wayne,


#if wxABI_VERSION >= 20811
    wxString GetAttribute(const wxString& attrName,
                         const wxString& defaultVal) const
    {
        return GetPropVal(attrName, defaultVal);
    }
    bool GetAttribute(const wxString& attrName, wxString *value) const
    {
        return GetPropVal(attrName, value);
    }
    void AddAttribute(const wxString& attrName, const wxString& value)
    {
        AddProperty(attrName, value);
    }
    wxXmlProperty* GetAttributes() const
    {
        return GetProperties();
    }
#endif // wx >= 2.8.11


The above is in the wx/xml.h Ubuntu header file.  So maybe the Ubuntu
folks patched the stock wxwidgets at 2.8.10?

None the less, the first thing I'd have to do to your CMakeLists.txt
test with only a version check, is to change it back to 2.8.10,
rendering the whole thing useless.

Instead of testing for a minimum version, can you test for
GetProperties() and GetAttributes().  If only the former, map the latter
to the former.

I promise not to use any more functions in the library.  So let's find
the minimally intrusive solution.

Dick




Follow ups

References