Recent

Author Topic: compproc.inc Error: Fields cannot appear after a method or property definition  (Read 3175 times)

BriggsBFC

  • Newbie
  • Posts: 2
Hi,

I followed the instructions here: http://wiki.lazarus.freepascal.org/Android_tutorial#Rebuild_Lazarus_IDE

But when I compile with:
make crossinstall CPU_TARGET=arm OS_TARGET=linux CROSSBINDIR=~/Android/android-ndk-r13b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin OPT=-dFPC_ARMEL INSTALL_PREFIX=~/Android/fpcsrc/Makefile

I get the following compiler errors:
compproc.inc(64,91) Error: Fields cannot appear after a method or property definition, start a new visibility section first
compproc.inc(65,102) Error: Fields cannot appear after a method or property definition, start a new visibility section first
compproc.inc(66,94) Error: Fields cannot appear after a method or property definition, start a new visibility section first
compproc.inc(320,114) Error: Fields cannot appear after a method or property definition, start a new visibility section first
compproc.inc(320,136) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted


I'm new to Lazarus, any help would be appreciated.

Cyrax

  • Hero Member
  • *****
  • Posts: 832
Which version of FPC you are using?

BriggsBFC

  • Newbie
  • Posts: 2
I downloaded the latest version of FPC with:
svn co http://svn.freepascal.org/svn/fpc/trunk/ ~/Android/fpcsrc

It would appear I have Version 3.1.1

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8718
  • FPC developer.
From the little info that you give, an educated guess would be that you run a separate install makefile step with the globally installed compiler, while you probably should pass the compiler generated in some previous build step.  (PP=c:\fpc\newlygenerated\compiler\ppccrossarmhf or something)

Or it tries to trigger an install without a build (all) step, and then it should be the release compiler (globally installed or manually passed like above)
« Last Edit: January 10, 2017, 11:47:20 am by marcov »

lmcmillan

  • Newbie
  • Posts: 1
Silly as it was, I got this error once because I used "string:" instead of "string;"  That is, I mis-typed and put a colon in there instead of a semi-colon.  It was in the implementation section of a unit, and gave me that error. 

PascalDragon

  • Hero Member
  • *****
  • Posts: 2102
  • Compiler Developer
No, in the case of BriggsBFC it was definitely a compiler mixup, because back then I had extended compilerproc to take an optional :INTCONST and older 3.1.1 compilers did not support that (the code inside compproc.inc only protected that against the 3.0.x series).

 

TinyPortal © 2005-2018