Hi, I work on a Solaris 7 plateform. GPC features are gpc version 2.1 (20020510), based on 2.95.2 19991024 (release)
I have one module called sun.p : ------------------------------ Module SUN INTERFACE;
export SUN = all;
procedure myproc;
CONST Max = 32767; Min = -32768; End.
Module SUN IMPLEMENTATION;
Procedure myproc; Begin Writeln('allo'); End;
End.
------------------------------
I have one main program : ------------------------------ program essai;
import sun;
begin end.
------------------------------
When I compile with gpc. I get an error : ./src/testpascal.p:3: parse error before `1'
When I watch the temporaries files, actually testpascal.i, I see "import sun" was switched by "import 1".
What's wrong?
Thanks
Mehdi Khaldi wrote:
I work on a Solaris 7 plateform. GPC features are gpc version 2.1 (20020510), based on 2.95.2 19991024 (release)
I have one module called sun.p :
Module SUN INTERFACE;
export SUN = all;
procedure myproc;
CONST Max = 32767; Min = -32768; End.
Module SUN IMPLEMENTATION;
Procedure myproc; Begin Writeln('allo'); End;
End.
I have one main program :
program essai;
import sun;
begin end.
When I compile with gpc. I get an error : ./src/testpascal.p:3: parse error before `1'
When I watch the temporaries files, actually testpascal.i, I see "import sun" was switched by "import 1".
What's wrong?
As you can see with `-v', there are some default defines, including `sun' on a Sun. These are actually macros with value 1.
You can disable macros in genral using `--no-macros'. But I'd recommend to rename the unit, since `Sun' is probably too general a name, anyway ...
Frank