Opened 10 years ago

Closed 10 years ago

#2491 closed defect (fixed)

DWF Toolkit 7.7 compilation failure on GCC 4.7 and above

Reported by: jng Owned by: jng
Priority: low Milestone: 3.0
Component: Build System Version:
Severity: trivial Keywords:
Cc: External ID:

Description

Building trunk with freshly merged DWF Toolkit 7.7 on Ubuntu 14.04 64-bit produces compilation errors like this

In file included from ../../../dwf/package/PropertySet.h:33:0,
                 from ../../../dwf/package/ContentElement.h:34,
                 from ../../../dwf/package/Class.h:36,
                 from ContentReader.cpp:25:
../../../dwfcore/Vector.h: In instantiation of 'bool DWFCore::DWFOrderedVector<T, Pr, Eq>::findFirst(const T&, size_t&) const [with T = DWFToolkit::DWFClass*; Pr = DWFCore::tDWFCompareLess<DWFToolkit::DWFClass*>; Eq = DWFCore::tDWFCompareEqual<DWFToolkit::DWFClass*>; size_t = long unsigned int]':
../../../dwf/package/Class.h:149:59:   required from here
../../../dwfcore/Vector.h:591:41: error: '_tEquals' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
             if (_tEquals( oValue, *iter ))

                                         ^
../../../dwfcore/Vector.h:591:41: note: declarations in dependent base 'DWFCore::DWFVector<DWFToolkit::DWFClass*, DWFCore::tDWFCompareLess<DWFToolkit::DWFClass*>, DWFCore::tDWFCompareEqual<DWFToolkit::DWFClass*> >' are not found by unqualified lookup
../../../dwfcore/Vector.h:591:41: note: use 'this->_tEquals' instead

This is due to name lookup changes introduced in GCC 4.7

The easiest solution would be to apply the -fpermissive compiler flag to convert these errors to warnings.

The proper fix, would be to find and replace all instances of _tEquals with this->_tEquals as suggested by the compiler error message

Change History (1)

comment:1 by jng, 10 years ago

Resolution: fixed
Status: newclosed

Fixed r8367, r8368 and r8369

Note: See TracTickets for help on using tickets.