Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, March 2002
Setlocale problem


Message 1 in thread

Hi all,

I'm new with Qt, and need any help about setlocale() for Qt-embedded for
MIPS.

I cross-compiled Qt-embedded 3.0.2 for mipsel on RedHat 6.2 using:
./configure -embedded mips -shared -debug; and gmake.

When compiling I had an error reported of undefined CODESET in
qtextcodec.cpp, l. 725.
So, I worked around it by commenting the majority of
QTextCodec::codecForLocale() and left:
    localeMapper = codecForName( "ISO 8859-1" );

The problem raised again in Segmentation fault when starting start_demo and
executing launcher.
Debugging showed that file.local8Bit in QWSServerSocket::QWSServerSocket()
in qwssocket_qws.cpp caused Segmentation fault.

I tried to disable internationalization by defining QT_NO_TEXTCODEC and
QT_NO_UNICODETABLES in qconfig.h, but the result is the same.

The problem is that I can not call setlocale() in RedHat 6.2 because I don't
have glibc-2.2.
The mipsel-linux library libc.so.6 supports setlocale(), but I don't know
how to enable it for cross-compiling :-(.

Thanks a lot,

Dusko