On Thu, 20 Jul 2006, Marco van de Voort wrote:

On Thu, 20 Jul 2006, Marco van de Voort wrote:


You need to link to the C library as well.

So, add

{$linklib c}

_Never_ add linklib c or linklib gcc directly, always work via unit initc.
That's what it is for.

I thought the compiler did this automatically when it detects a link to
the C library ?

Not that I know. It mostly is useful so that you don't have to change
seventy headers if the name of libc changes on some platform, to potentially
polish away issues with dependancies on certain sublibraries
(libdl,libgettext,libgcc), and to encapsulate libc errno access.

There shouldn't be a {$linklib C or linklib gcc in any unit. _always_ via
unit initc.

If you really believe that:
I suggest you start working on the sources in SVN then, because there are _a lot_ of them.

But I don't think that it should be done like that...

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to