Hi everyone - got a question about GPC
rugxulo at gmail.com
Tue Feb 16 06:53:09 CET 2010
On Mon, Feb 15, 2010 at 4:11 PM, Frank Heckenbach <ih8mj at fjf.gnu.de> wrote:
> Rugxulo wrote:
>> 1). Why is "--executable-file-name" such a long option to type?
>> Wouldn't "--exe" be more convenient?
> Well, we also have "--executable-path". ;-)
>> 2). DJGPP has a habit of making both "blah" and "blah.exe" when you
>> type "gpc blah.pas -o blah". This also affects your GP program. It's
>> really only useful with *nix makefiles (so the target and file will be
>> recognized), but it's pretty useless and annoying otherwise.
> AFAIR, "blah" is the COFF executable which can be called from other
> DJGPP programs,
Honestly, nobody uses plain COFF files anymore. That's a relic from
when a separate GO32.EXE was needed (DJGPP v1). But DJGPP can "call"
(run) either plain COFF or .EXEs anyways.
> and "blah.exe" is prefixed with a DOS loader (which
> is done by the "stubify" program), so it can be called from plain
> DOS programs as well. So depending on your needs, either or both may
> be useful.
> But it's been long since I've used DJGPP, so in case this was
> inaccurate or incomplete, Maurice will correct me, I hope.
You're right in that it used to be that way. But somewhere along the
line it changed. I'm not sure if it's correct, but I *think* BinUtils
(e.g. LD) handles it differently now. At least, using DJGPP 2.04, GCC
4.4.2, LD 2.19.1, 'gcc -s -O blah.c -o blah" (simple "Hello, World!"
example) produces "blah" and "blah.exe" that are 100% identical (with
stub, i.e. both in .EXE format).
More information about the Gpc