[geos-devel] XMLTester error

John Cartwright john.c.cartwright at comcast.net
Fri Nov 23 00:27:55 EST 2007


Thanks Mateusz, that seems to work great!

I appreciate your prompt response.

--john


On Nov 22, 2007, at 6:48 PM, Mateusz Loskot wrote:

> 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
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel



More information about the geos-devel mailing list