On 3 Apr 2004 at 15:54, Frank Heckenbach wrote:
[...]
Ok, thanks. I have sent it to them both. There is another problem as well. GRX cannot be used with the Crt unit (using PDCurses) - there are multiple definitions of getmaxx and getmaxy in libpdcurses.a and libgrx20.a.
That's an old problem (I talked about it with Mark Hessling, the PDCurses author, 5 years ago). Apparently these symbols are both part of the curses standard and used by Borland C's graph library.
In C, both have to be global functions. (There are also macros, but AFAIK the functions are provided for cases like taking the address of them.)
I suggested to Mark to put a conditional around the global functions, and I think he agreed, but apparently this hasn't been done.
So unless one can convince him, or the GRX authors, to do this, you might have to patch one the libraries yourself. The patched versions might fail in some strange situations in C, so they should be labeled. In Pascal it won't be a problem if you adjust the external names (and calls to them from within the library -- there seem to be a few in both cases).
It I have written a small "graphcrt" unit that can be used instead - just to get programs to compile (see below - perhaps there is a portable way to implement "Sound" and "NoSound" without using Crt?):
unit graphcrt;
interface procedure nosound; procedure clrscr; procedure sound (freq : integer); procedure textcolor (col : integer); procedure delay (interval : integer); external name 'GrSleep';
implementation uses Graph;
procedure clrscr; begin ClearDevice; end;
procedure textcolor; begin SetColor (x); end;
procedure sound; begin end; procedure nosound; begin end;
end.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/