[fpc-devel] Linux ELF linking problem

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Mar 19 12:55:29 CET 2008


On 19 Mar 2008, at 12:42, petr.kristan at epos.cz wrote:

> On Wed, Mar 19, 2008 at 11:50:29AM +0100, Jonas Maebe wrote:
>>
>
>> You are normally required to initialise the locale yourself before
>> calling nl_langinfo(CODESET), by calling setlocal(LC_ALL,'') (at  
>> least
>> on non-Linux this is always needed).
> I'am very sorry, I do not know about initializing  
> (setlocale(LC_ALL,'')).
> With this it works ok.
>
> Thanks.
>
> With kylix compiler it works without initializing, now I found why. In
> sysutils initialization they call setlocale. It confused me.

In FPC, this is done in the cwstring unit (which installs the  
widestring manager under unix/Linux, without that unit locale-based  
routines for ansistrings and widestrings and conversion from one into  
the other will not work there). The reason for requiring this extra  
unit is that the default RTL does not depend on libc on Linux.

> But missing __libc_start_main do not mind? I think that it initializes
> malloc and threads.

I don't know. At least I've never heard about such problems.


Jonas



More information about the fpc-devel mailing list