On 14 Sep 2005 at 11:02, Andres K. Foerster wrote:
Hello,
I normally do my programming with Free Pascal. But I wanted to give GNU Pascal a try again.
Well I don't have any problems under GNU/Linux anymore, but the version for MinGW makes trouble with the CRT unit. I have installed PDCurses 2.6-2 for MinGW.
Programs using the CRT unit do compile and the output stuff is all okay, but the input doesn't work as it should.
On most keypresses ReadKey just returns #0+#255, just occasionly it returns the correct keycode.
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.
Can you please send a test program? I have not encountered any of these problems. Also, what is your GPC version? (run "gpc -v").
Is GPC for MSYS better?
Better in what way?
Why is there a separate version anyway?
Because they are different environments.
I mean, MSYS belongs to MinGW, isn't it?
MSYS is a fork from Cygwin, the purpose of which is to provide a minimalist *nix environment so that shell scripts can be run. It allows you to build native Win32 GNU tools without using a cross compiler or installing Cygwin. It is not a native Win32 environment and I am not sure what "belongs to MingW" means!
I've seen, that GPC still doesn't support "{$AppType GUI}" or "{$AppType Console}". That's an extension comming from Delphi. Free Pascal supports it on the Windows and the Amiga platform. I found out, that in GPC they correspond to the linker-parameters "-mwindows" or "-mconsole". But it would be nicer to have it in the source code.
And then the source code would not be portable. Those switches may well mean nothing under anything other than Windows.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/