* * *

Author Topic: How to use the right fpc  (Read 435 times)

kapibara

  • Sr. Member
  • ****
  • Posts: 462
How to use the right fpc
« on: August 15, 2017, 09:24:43 am »
In Debian, I installed an older release of fpc (2.6.0) using GDebi and used that to compile a some early fpc 2.7.1 trunk revision. Because I want to find the fpc revision that broke pascalscript's 64bit support. Finally I compiled an 1.0.6 Lazarus revision using the 2.7.1 fpc revision, then went to Lazarus setup and selected the 2.7.1 sources and fpc.

Finally I rebuilt Lazarus from the menu system. Checking Lazarus Help -> About surprised me, it showed fpc 2.6.0 anyway. :-\ I did rescan lazarus sources but still said 2.6.0.

I'm no Linux guru at all but thought the old 2.6.0 fpc would not be used if I put 2.7.1 first in the path. So from commandline I had done:

PATH=~/fpc/2.7.1:$PATH
export PATH

In Linux, how to make sure the right fpc is used when compiling Lazarus from commandline or compiling applications within Lazarus? When I start the textbased 'fp' editor it shows fpc 2.6.0 in the about box even though I started fp from the 2.7.1 bin directory and the fpc makefile says fpc 2.7.1.
« Last Edit: August 15, 2017, 09:28:46 am by kapibara »
Lazarus trunk / fpc 3.0 / Debian Stretch 64-bit

Leledumbo

  • Hero Member
  • *****
  • Posts: 7721
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to use the right fpc
« Reply #1 on: August 16, 2017, 09:33:31 pm »
In Linux, how to make sure the right fpc is used when compiling Lazarus from commandline
Code: [Select]
$ fpc -l | grep version
or compiling applications within Lazarus?
Tools->Options->Environment->Files->Compiler executable, note that in super duper old Lazarus the menu might not be here.
When I start the textbased 'fp' editor it shows fpc 2.6.0 in the about box even though I started fp from the 2.7.1 bin directory and the fpc makefile says fpc 2.7.1.
  • FPIDE uses its own embedded compiler
  • Linux doesn't put current directory to PATH by default (for security reason), you will not execute the one in 2.7.1 bin directory without explicit path, e.g.: ./fp

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus