Sign in Join

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

Mailing lists / fpc-pascal / 2009-10

Mac OS X 10.6.1 problem

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Paul Davidson

Using OS X 10.6.1, FPC 2.2.4, Xcode 3.2 on intel iMac.

The program and units all have {$I Directives.inc} at top of each file. Compile lists many errors like:

6: Mode switch "OBJFPC" not allowed here

Any hints?

Reply by email

Jonas Maebe
to Paul Davidson
Paul Davidson wrote 8 lines
Using OS X 10.6.1, FPC 2.2.4, Xcode 3.2 on intel iMac. The program and units all have {$I Directives.inc} at top of each file. Compile lists many errors like: 6: Mode switch "OBJFPC" not allowed here Any hints?

This is unrelated to Mac OS X.

A modeswitch must occur before any code is parsed. In practice this means right above or below the "unit" statement. Older versions of FPC (2.2.0?) were more lenient in checking this.

Jonas

Reply by email

Marco van de Voort
to Jonas Maebe

In our previous episode, Jonas Maebe said:

Show quoted text 14 lines
> Using OS X 10.6.1, FPC 2.2.4, Xcode 3.2 on intel iMac. > > The program and units all have {$I Directives.inc} at top of each > file. Compile lists many errors like: > > 6: Mode switch "OBJFPC" not allowed here > > Any hints? This is unrelated to Mac OS X. A modeswitch must occur before any code is parsed. In practice this means right above or below the "unit" statement. Older versions of FPC (2.2.0?) were more lenient in checking this.

(I talked to Paul on IRC, and it was multiple $mode directives that caused the problem. Afaik that limitation was added at that same time too)

Reply by email