Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-01

Illegal Expression: Compile Err - On one XP Pro box, not another - same source. Please Advise

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jason P Sage

Hello All,

I have just installed the same exact FPC 2.0.4 Binary install on a new XP Pro Box. When I compile code on this box with source files that compile On my other XP Pro box and my Fedora Linux Box - I get invalid operator.

I'm using the Bracket style compiler directive for objfpc compile mode in the source file.

Here is pseudo code example of the problem. This problem is very mechanical and reproducible on this new XP Pro machine. I'm hoping it’s a compiler configuration flag or something - but I can't figure it out.

-----------------BEGIN------------------

program test;
// Platform Size integer in theory (32 bit on 32bit machine)
var MyInt: integer;
begin
  MyInt+=1;  // Error Here
End.

-------------- END -------------------

Note: Same Source file compiles fine on both an XP Pro box, and a Linux Fedora 5 box, but on a brand new Windows XP Pro machine - this problem is coming up.

I also use this construct for things like MyAnsiString+='more text';

Both are using FPC 2.0.4 Windows Install Package as downloaded through FreePascal.org web site - Same version. Is it something in the INI file?

Thank you in advance!
Jason P Sage

No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.0/639 - Release Date: 1/18/2007 6:47 PM

Reply by email

Marc Weustink
to Jason P Sage
Jason P Sage wrote 30 lines
Hello All, I have just installed the same exact FPC 2.0.4 Binary install on a new XP Pro Box. When I compile code on this box with source files that compile On my other XP Pro box and my Fedora Linux Box - I get invalid operator. I'm using the Bracket style compiler directive for objfpc compile mode in the source file. Here is pseudo code example of the problem. This problem is very mechanical and reproducible on this new XP Pro machine. I'm hoping it’s a compiler configuration flag or something - but I can't figure it out. -----------------BEGIN------------------ program test; // Platform Size integer in theory (32 bit on 32bit machine) var MyInt: integer; begin MyInt+=1; // Error Here End. -------------- END ------------------- Note: Same Source file compiles fine on both an XP Pro box, and a Linux Fedora 5 box, but on a brand new Windows XP Pro machine - this problem is coming up.

This is not a standard pascal syntax. You need to enable this with the -Sc switch.

I guess you changed your fpc.cfg and haven't done so on your new box

Marc

Reply by email