Recent

Author Topic: How to configure fp? (it doesn't see any unit)  (Read 4926 times)

pik33

  • Jr. Member
  • **
  • Posts: 63
How to configure fp? (it doesn't see any unit)
« on: September 10, 2015, 09:04:39 pm »
I have fpc/Lazarus built from sources on Raspberry Pi. The Lazarus works OK; the console fp IDE is not configured.

Example:

program test;
uses crt;
begin
end.

cannot compile because it cannot find unit crt.

How to tell the this IDE where these units are? Source directory is /usr/local/fpc/trunk (as read from Lazarus settings)

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: How to configure fp? (it doesn't see any unit)
« Reply #1 on: September 10, 2015, 10:41:08 pm »
The fp ide has all kind of menu's and windows you can invoke.

One of the menu's is called options, see also here.

Just as the command-line counterpart there's need to configure the built-in compiler and tell fp where it can find your units etc.

Unfortunately is was unable to find a visual guide which shows all the windows and options inside fp-ide for you.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to configure fp? (it doesn't see any unit)
« Reply #2 on: September 11, 2015, 08:17:00 am »
Unfortunately is was unable to find a visual guide which shows all the windows and options inside fp-ide for you.
Here's one

pik33

  • Jr. Member
  • **
  • Posts: 63
Re: How to configure fp? (it doesn't see any unit)
« Reply #3 on: September 11, 2015, 11:38:07 am »
Thank you, it works now

For the Raspberry Pi it was /usr/local/lib/fpc/3.1.1/units/arm-linux/*


Edit.. it ALMOST works. Run... Ctrl-F9 - nothing.

It cannot see ctrl+Fn... why? To run something I have to use the mouse.
And there is no debugger (config again?)

But at least it can compile something. It was many years ago when I programmed in text environment (Turbo Pascal) last time...
« Last Edit: September 11, 2015, 01:17:18 pm by pik33 »

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: How to configure fp? (it doesn't see any unit)
« Reply #4 on: September 12, 2015, 07:27:35 pm »
Thank you Leledumbo.

@pik33:
It might be that the arm version of FP ide does not support creating a fresh shell in order to run the produced executable (or the path is wrong ?)

AFAIK there are no special settings in fp-ide that could aid you in solving the problem (do note the afaik).

Perhaps someone with more experience/knowledge could shed a light ?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to configure fp? (it doesn't see any unit)
« Reply #5 on: September 12, 2015, 07:37:02 pm »
Edit.. it ALMOST works. Run... Ctrl-F9 - nothing.

It cannot see ctrl+Fn... why? To run something I have to use the mouse.
Do you use any DE? If yes, it might be taking over the shortcut. At least in KDE, it does. So I have to unbind that from KDE's global shortcut.
And there is no debugger (config again?)
Show your Help->About, if you don't have the red circled text, your fpide is not built with debugger support.

pik33

  • Jr. Member
  • **
  • Posts: 63
Re: How to configure fp? (it doesn't see any unit)
« Reply #6 on: September 18, 2015, 06:24:27 am »
This is Raspberry Pi in text mode, so no display manager and no X used

(when in X I have Lazarus working without any problem)

So, the best solution seems to be using Lazarus in X to develop and debug text mode programs.

 

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to configure fp? (it doesn't see any unit)
« Reply #7 on: September 18, 2015, 06:30:50 am »
This is Raspberry Pi in text mode, so no display manager and no X used

(when in X I have Lazarus working without any problem)

So, the best solution seems to be using Lazarus in X to develop and debug text mode programs.
Does the mouse work there? My pi is also headless but I use vim to code :S