[geos-devel] XMLTester error

Mateusz Loskot mateusz at loskot.net
Thu Nov 22 20:48:23 EST 2007


John Cartwright wrote:
> Hello All,
> 
> I'm trying to compile 2.2.3 on Mac OS 10.5 and running into the
> following error:
> 
> XMLTester.cpp:66: error: 'std::tolower' is not a valid template argument
> for type 'int ()(int)' because function 'int tolower(int)' has not
> external linkage
> 
> Can someone suggest how I might deal with it?

John,

There are two versions of tolower available in C++:
old C functiona and new locale-aware function in C++.
Apparently, GCC under Leopard introduces some changes
that cause tolower is ambiguous if both prototypes of tolower are
included and the function is through pointer to function what occurs in
line 66.

Could you try to replace the line 66 in file XMLTester.cpp with
following line and see if it compiles for you now?

std::transform(str.begin(), str.end(), str.begin(),
(int(*)(int))std::tolower);

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net


More information about the geos-devel mailing list