[fpc-devel] Might need some help with this one

Bart bartjunk64 at gmail.com
Thu Nov 26 18:42:21 CET 2020


On Thu, Nov 26, 2020 at 6:25 PM Bart <bartjunk64 at gmail.com> wrote:

> program break;
> {$apptype console}
>
> begin
>   writeln('I am Break');
> end.
>
> Compiles with fpc 3.2.0 and Delphi 7.
> Outputs nothing at all with both compilers....
>
> If I run it inside GDB
> Delphi 7 of fpc:
> Starting program: C:\Users\Bart\LazarusProjecten\bugs\breakprog/break.exe
> [New Thread 6888.0x26fc]
> [New Thread 6888.0x1ea0]
> [New Thread 6888.0x6bc]
> [New Thread 6888.0x25b0]
> I am Break
>
> Program exited normally.
>
>
> --
> Bart

  assign(F, 'break.txt');
  rewrite(F);
  writeln(F,'Writing to file...');
  close(F);

Does not create a file (if the program is called break).
Unless you run it in GDB, then it does.

Curious...

If you rename the executable (so after compilation/building) it runs
as expected.
So it is Windows that does this .....


-- 
Bart


More information about the fpc-devel mailing list