[fpc-pascal] warning: link.res contains output sections; did you forget -T?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Mar 4 13:55:00 CET 2013


On Mon, 4 Mar 2013 14:35:50 +0200
Juha Manninen <juha.manninen62 at gmail.com> wrote:

> Yes, I know this warning can be ignored, and every active member of
> this list knows it, too.
> However new users don't know it. Everybody who tries FPC / Lazarus for
> the first time will scratch their heads and use Google, trying to find
> out where exactly they forgot to put this "-T".
> 
> My workmate decided to try Lazarus after I had advertised it.
> This was the first thing that he, too, noticed and reported to me.
> Yes, Google gives links like:
>   http://www.lazarus.freepascal.org/index.php?topic=13500.0
> which finally clarify the situation.
> Still, is there really no way to get rid of this warning?
> I understand it comes from "ld". Is patching "ld" the only way?

Patching?
The error is simple: can not find the library. ld can not tell much
more, except maybe where it has searched, and what .o file or link.res
has asked for the library.
Maybe a quickfix item can be added to extend the message with that
information. Just like the IDE is doing for "can not find unit"
messages.
It can not give the information how to install the needed library,
because there are too many possibilities. Maybe a link to a page
about linker errors with some explanations and examples
can be given.
Or the lpk could provide a fpdoc topic about link errors and the IDE
could automatically show that.

Mattias



More information about the fpc-pascal mailing list