kicad-developers team mailing list archive
Mailing list archive
Re: Compiling fails on XML class on Apple OS X with wxWidgets 2.9-svn
On 8/11/2010 5:21 PM, Dick Hollenbeck wrote:
>> 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.
> #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?
It's the same in Debian testing as I expected. I was using a stock
2.8.10 on MinGW/MSYS which caused the build to fail. Using 2.8.11
solved the problem.
> 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.
This certainly is an interesting dilemma. Since the current version of
FindwxWidgets doesn't support version checking, I'll leave it as is for
now. It still would be handy to have version checking of the wxWidgets
> 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.
I think I could get CMake to run a compiler test for GetAttributes and
map it to GetProperties in config.h if it fails. It may be a few days
before I can get to it.
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp