Problem compiling with gcc 4.0.0 on Fedora core4

Michael Gatford michael.gatford@aprsmartlogik.com
Wed Jul 20 13:37:00 GMT 2005


We compile an application with gcc (historically 2.95.3, egcs-2.91.66 or 
VC5/6 on Windows).
I have just installed Fedora Core 4 and am trying to compile the code 
with gcc 4.0.0 (Redhat 4.0.0-8).

The segment of code that is causing a problem is:

FmConfig::FmConfig(const string& configFile)
{
    // Read configuration file configFile
    config_.clear();
    ConfFile parsedfile(configFile.c_str());
    parsedfile.read();

    ConfElementPointer el = parsedfile.first();

    while(el != NULL) {
        string group = el->name;
        std::transform(group.begin(), group.end(), group.begin(), tolower);

         ........................
    }

and it doesn't like the std::transform() method. I get the error message:

FmConfig.cxx:44: error: no matching function for call to 
'transform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >, 
__gnu_cxx::__normal_iterator<char*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >, 
__gnu_cxx::__normal_iterator<char*, std::basic_string<char, 
std::char_traits<char>, std::allocator<char> > >, <unknown type>)'

The same code compiles ok on Solaris 5.6/7 with egcs-2.91.66 and on 
Redhat 8.0 with gcc 2.95.3.

Mike



More information about the Gcc-help mailing list