When the DOS unit (and strangely only the DOS unit) is used both in a program and an unit used by this program, all the interface is flagged as redefined and compilation fails. This happens only with the Mingwin version, DJGPP and Linux version are OK (but they are older)
Here is a test: a programm and a unit Note that the unit DOS is not actually used.
******************************** program testinc; uses dos,unitinut; begin writeln(affichage); end.
**********************************
unit unitinut; interface var affichage:string; implementation uses dos; begin affichage:="affiche"; end. ***********************************
Jean-Pierre Vial wrote:
When the DOS unit (and strangely only the DOS unit) is used both in a program and an unit used by this program, all the interface is flagged as redefined and compilation fails. This happens only with the Mingwin version, DJGPP and Linux version are OK (but they are older)
Here is a test: a programm and a unit Note that the unit DOS is not actually used.
program testinc; uses dos,unitinut; begin writeln(affichage); end.
unit unitinut; interface var affichage:string; implementation uses dos; begin affichage:="affiche"; end.
I can't reproduce it (Linux, DJGPP, current version). Do you use any compiler options (besides `--automake', I suppose)? Do you perhaps have previously created .gpi files around, and if so, does it help if you move them away?
Can someone else reproduce it?
Frank
On 3 Sep 2002 at 16:39, Frank Heckenbach wrote:
Jean-Pierre Vial wrote:
When the DOS unit (and strangely only the DOS unit) is used both in a program and an unit used by this program, all the interface is flagged as redefined and compilation fails. This happens only with the Mingwin version, DJGPP and Linux version are OK (but they are older)
[...]
I can't reproduce it (Linux, DJGPP, current version). Do you use any compiler options (besides `--automake', I suppose)? Do you perhaps have previously created .gpi files around, and if so, does it help if you move them away?
Can someone else reproduce it?
No, I can't. Not even on Mingw.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com
On 3 Sep 2002 at 16:39, Frank Heckenbach wrote:
Can someone else reproduce it?
I cannot:
D:\Pascal\Test>gpc -v Reading specs from D:\Pascal\i486-pc-mingw32msvc\2.95.3\specs gpc version 2.1 (20020510), based on 2.95.3 20010315 (release)
D:\Pascal\Test>gpc --automake testinc.pas .\unitinut.pas:4: warning: missing string capacity - assuming 255
D:\Pascal\Test>testinc affiche
This appears to be what is expected.
-- Dave Bryan