[fpc-devel] "fpc -h" and "fpc -i"

Tomas Hajny XHajT03 at hajny.biz
Fri Nov 7 00:13:32 CET 2014

On Thu, November 6, 2014 23:30, Juha Manninen wrote:
> Lazarus has a GUI for all FPC options, parsed directly from "fpc -h"
> and "fpc -i".
>   Project Options -> Compiler Options -> Other -> All Options ...
> "fpc -h" output would be generated from the JSON data, thus it would
> not require more maintenance.

If you mean that FPC itself should use a JSON file for generating the
help, that doesn't sound like a good idea to me (see below).

> Unfortunately this will not happen anytime soon, nobody is working on it.
> Until then, small improvements in "fpc -h" output would be good.
> One more issue are the options missing from "fpc -h".
> Currently I only know that -gtt, -gttt, -gtttt etc. are not mentioned,
> there is only -gt, yet the extra 't's are not duplicate options but
> they change the meaning.

I'd suggest creating a bug report about options missing in the list
(mentioning -gtt[t[t]] and anything else you'd be aware of. You (or anyone
else ;-) ) may deduce the list of supported options from options.pas
_plus_ the options supported in fpc.pas.

> Long time ago there was a discussion about those missing options but
> they may be added. Does anybody know?
> I looked at FPC sources trying to find where the help strings are done.
> I only found "msgtxt.inc" which apparently is generated, but where is
> it generated?

This file is indeed generated from fpcsrc/compiler/msg/errore.msg where
all the texts emitted by the compiler are stored while allowing easy
translation to other languages (it's a simple text file with just a few
conventions for proper parsing - some for the messages issued during
compilation, others for proper displaying of the help).


More information about the fpc-devel mailing list