problems with STL on FreeBSD 5.3
Darko Miletic
darko@uvcms.net
Fri Apr 1 16:23:00 GMT 2005
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
More information about the Libstdc++
mailing list