[fpc-pascal] Re: Handling with sources and exebutables with different names

luciano de souza luchyanus at gmail.com
Thu May 17 21:09:47 CEST 2012

Actually, there are no errors.

Using cmd.exe on Windows 7 and FPC 2.6.0, I did:

fpc test.pas -oindex.cgi

I got test.exe and no errors are raised.

We can do -d in the commandline or {$ifdef ..} in the source code.
Several other options are available from the two modes. Is there a
directive, placeable in code, allowing me to define a name for the

I am asking to myself: "Did I become crazy? Have I done the test
wrongly?" Yes, it can be. However, I did it several times with the
same result. I don't know what, but something misleading is wrong.

2012/5/17, luciano de souza <luchyanus at gmail.com>:
> hello all,
> I am compiling CGI modules with Freepascal in commandline mode. if I do:
> fpc test.pas
> the result is "test.exe". But the source name needs to be different
> from the executable name. For this reason:
> fpc test.pas -oindex.cgi
> This command should result in index.cgi, placed on the current folder.
> However, this command is ignore and I obtain "test.exe" again.
> My question is: how to produce a executable, compiling from the
> commandline in FPC 2.6.0, with a different name of its source?
> Regards,
> Luciano

More information about the fpc-pascal mailing list