This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problems with STL on FreeBSD 5.3


Hi,

Recently I installed FreeBSD 5.3 release on my machine, since I'm trying to port some C++ library to this OS. The problem is that I can not use std::locale class. Whatever locale I specify other than "C" it throws exception
locale::facet::_S_create_c_locale name not valid


I tried en_US.ISO8859-1, en_US.UTF-8, en_US.ISO8859-15 etc. But error persists. So are there any resolution for this kind of problems?

Here is a small program to reproduce error:

#include <iostream>
#include <locale>
#include <stdexcept>

int main(int argc, char* argv[])
{
  try {
    std::locale test("en_US.ISO8859-1");
  }
  catch (const std::exception& e){
    std::cout << e.what() << std::endl;
    return -1;
  }

  return 0;
}


Darko




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]