CRT on mingw
Prof A Olowofoyeku (The African Chief)
chiefsoft at bigfoot.com
Wed Sep 14 20:45:02 CEST 2005
On 14 Sep 2005 at 15:33, Andres K. Foerster wrote:
> > > ReadLn also behaves strange: It takes and displays the entered text
> > > correctly, but when I press the Enter-key, it just displays a
> > > musical note (the character of #13). When I repeat typing the Enter
> > > key, then at some point it is accepted. But the input string still
> > > has all the other
> > > #13's at its end.
Looks like something broken in your curses library, or some weird
setting on your terminal.
> BTW. the same happens with the Backspace key...
> > Can you please send a test program? I have not encountered any of
> > these problems.
> On my system it happens with any simple program which uses CRT.
> Program readtest;
> uses CRT;
> var s: String(80);
> Program keytest;
> uses CRT;
> var c: char;
> c := ReadKey;
> WriteLn(c:2, ord(c):4);
> until false;
Well, I don't have any problems running either of these programs, and I
do not experience what you are experiencing.
BTW: I don't think there is any need to call CrtInit directly.
> > Also, what is your GPC version? (run "gpc -v").
> Reading specs from
> c:\progra~1\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\specs Configured
> with: ../configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32
> --target=mingw32 --prefix=/mingw --enable-threads --disable-nls
> --enable-languages=pascal --disable-win32-registry --disable-shared
> --enable-sjlj-exceptions --without-x --enable-interpreter
> --enable-hash-synchronization Thread model: win32 gpc version 20041218,
> based on gcc-3.2.3 (mingw special 20030504-1)
An old version. But I am not sure if that is the cause of your problem.
Looks like a pdcurses thing - but Frank might be able to tell.
> It's the binary from your website.
> > > Is GPC for MSYS better?
> > Better in what way?
> I mean, why should I prefer one over the other?
Depends on whether you need to use *nix pathnames, etc., and whether
you are trying to produce native Win32 binaries with no external
dependencies, or ones that require the MSYS runtime DLL (to provide
some posix support).
> I'm using the mingw compilers with the MSYS environment.
Then you should probably stick with the Mingw version. If you are using
Mingw and not Cygwin, then you clearly are trying to produce native
Best regards, The Chief
Prof. Abimbola A. Olowofoyeku (The African Chief)
More information about the Gpc