Author Topic: c::b MinGW distribution  (Read 3971 times)

Offline Faultier

  • Multiple posting newcomer
  • *
  • Posts: 13
    • http://
c::b MinGW distribution
« on: March 23, 2005, 08:11:49 pm »
Hi,
I am new to the mingw compiler and have several problems with it. I want to know if it is a general mingw problem or more a problem with the mingw installation of the beta6.

First I found out, that there is not a std::wcout object for wide streams. After an hour of googling, I was told to use the better STLport library. After a whole day of trying to compile the STLport iostreams library (make -f gcc-mingw32.mak clean all), I gave up. (Unfortunately, I can not find a binary version of the STLport library.)

Isn't it possible to use the mingw installation of the beta6 on the command line?

Second I found out, that I can not use my favorite source code line "std::locale::global(std::locale(""));" to localize my text output in console applications. the old C-style setlocale() will just work for printf with doubles and floats, but not for the cout stream and not for different code pages. It seems, that localization will not work, although there are the locale header files.

But I need localized console apps, most suitable with unicode.

Thanks for every help,
Stefan

Offline Faultier

  • Multiple posting newcomer
  • *
  • Posts: 13
    • http://
you need MSYS
« Reply #1 on: March 26, 2005, 01:08:04 pm »
Hi,
okay, I will help myself ;)
Now, what I found out. It is right, the gcc libraries have just wide strings, but no wide streams implemented yet. Using the STLport library is a solution.
Compiling the STLport library is not very easy, but with help of the community it is doable.
The makefiles of the STLport project uses commands, which need a MSYS installation. So if you want to use the mingw installation of the beta6 on the command line, you will need a msys installation sometimes. While installing msys on your machine, the make.exe file of the code::blocks installation will be renamed, so be sure to take care of it.
Using the STLport library, will give you the advantage of using wchar_t strings which can be printed with the wcout stream object, this is an easy way to localize concole applications. But, I have not fully test it, yet.