[fpc-devel] Linux ELF linking problem

petr.kristan at epos.cz petr.kristan at epos.cz
Wed Mar 19 12:42:46 CET 2008


On Wed, Mar 19, 2008 at 11:50:29AM +0100, Jonas Maebe wrote:
> 
> On 19 Mar 2008, at 11:20, petr.kristan at epos.cz wrote:
> 
> >Linux i386 system, fpc from svn rev 10506.
> 
> Did this work before? If so, between which and which revision did it  
> stop working?
No, it was first experiment.

> >Simple program for retrive system charset:
> >
> >program b;
> >uses
> > Libc;
> >begin
> >  writeln(nl_langinfo(CODESET));
> >end.
> >
> >Prints: ANSI_X3.4-1968
> 
> 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.

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

Petr

-- 
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709



More information about the fpc-devel mailing list