Lazarus

Free Pascal => FV/Textmode IDE => Topic started by: jacmoe on February 28, 2017, 11:31:30 pm

Title: [Solved] FP - configuration
Post by: jacmoe on February 28, 2017, 11:31:30 pm
I want to use FP and when I use it, it doesn't work that well.

Do I really have to enter all the paths into it for each and every project that I want to create / work with?

Just copying fpc.cfg to fp.cfg does not work - I've tried that.


Lazarus works "out of the box" , FP does not.

Any tutorials, tips ?

I like Turbo Pascal, that's why I'd like to use FP more.

Edit:
Does it use binary DSK files instead?
Yes, it seems to do that.

Title: Re: FP - configuration
Post by: jacmoe on March 01, 2017, 12:29:37 am
What values are you guys using?
Title: Re: FP - configuration
Post by: jacmoe on March 01, 2017, 01:30:32 am
So, I installed FPC in Windows 2000 (VirtualBox) and the Free Pascal IDE worked out of the box.

I can live with that.

From what I can gather, no Linux users are using fp :)
Title: Re: FP - configuration
Post by: Leledumbo on March 01, 2017, 09:51:39 am
From what I can gather, no Linux users are using fp :)
I use it. There's no better way for debugging in headless server other than fp ide.
Title: Re: FP - configuration
Post by: marcov on March 01, 2017, 09:53:40 am
How did you install FPC on Linux? Using an official (.tar) distribution, or 3rd party distribution packages?

Afaik fpmkcfg has some option to create fp.cfgs, and you can have a global fp.cfg (~/.fp.cfg ?)

There is only one path to set  to $PREFIX/lib/fpc/$FPCVERSION/units/FPCTARGET/*

where $PREFIX is /usr or /usr/local or some directory in your homedir depending on installation. The other $FPC* you can copy verbatim, they are macros that are filled in by FPC.  I usually install releases system wide and snapshots in ~/builded or ~/builded64

Title: Re: FP - configuration
Post by: jacmoe on March 01, 2017, 10:01:46 am
Thanks guys :)

I figured it out - or I think I did:

The problem was that I am using Fpcupdeluxe, where 'fp' is in 'fpcupdeluxe/fpc/bin/$fpctarget'

I also had a global 'fp' which I have uninstalled now.

I noticed that when I ran 'fp' from it's directory, it worked, after entering the correct include/lib directories.

So, I created a desktop entry for it, so that working directory is set to same.

And it works :)

This is what I entered into the "Directories" config screen:

Units:
Code: Pascal  [Select][+][-]
  1. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget
  2. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget/*
  3. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget/rtl
  4.  

Include files:
Code: Pascal  [Select][+][-]
  1. /usr/lib/gcc/x86_64-linux-gnu/6
  2. /home/jacmoe/fpcupdeluxe/fpc/lib/$FPCTARGET
  3.  

Libraries:
Code: Pascal  [Select][+][-]
  1. /usr/lib/$FPCTARGET
  2. /usr/lib/$FPCTARGET-gnu
  3. /lib/$FPCTARGET
  4. /lib/$FPCTARGET-gnu
  5. /usr/lib/gcc/x86_64-linux-gnu/6.3.0
  6.  

Edit: If not all of these are necessary, I will probably experiment with removing them, until I get errors.

I am wondering:
Could I have done this differently ?

Right now, I am letting fp have a fp.cfg in it's bin directory.

Thanks for the pointers, Marcov.
And thanks for the encouragement, Leledumbo.
 ;D
Title: Re: FP - configuration
Post by: jacmoe on March 01, 2017, 10:06:01 am
I probably should add:

It works, so I am happy. :D

And it might well be that it works out of the box on Linux, as long as you don't do any funny business, like using Fpcupdeluxe.  8)

I really like the FP IDE - and I wish that there was similar for C/C++, as I am a big fan of Borland C++ 3.1 / Turbo Pascal 7.

Edit:
I found out that there is one, actually: RHIDE (http://www.rhide.com/).
It is based on the C++ sources of Turbo Vision that Borland released into the open, before they released the Pascal sources to the FPC (and thus the open).
RHIDE was originally a Djgpp only IDE, but support for GCC/DBG has been added.
I am going to take that for a spin :)

Edit_Again:
And then there is Set's Editor (http://setedit.sourceforge.net/)
Title: Re: FP - configuration
Post by: marcov on March 01, 2017, 10:30:35 am
Edit:
I found out that there is one, actually: RHIDE (http://www.rhide.com/).
It is based on the C++ sources of Turbo Vision that Borland released into the open, before they released the Pascal sources to the FPC (and thus the open).
RHIDE was originally a Djgpp only IDE, but support for GCC/DBG has been added.
I am going to take that for a spin :)

For a while RHIDE's debugger worked better, but that is long ago (15 years). Borland /NEVER/ release the pascal source to FPC, Free Vision is a parallel development based on a 3rd party graphical "vision" clone, which might have origins in the C++ code.

Over the years incompatibilities have been mended and gaps have been filled.

Btw I can see the reason for /usr/lib/gcc/x86_64-linux-gnu/6.3.0

but I don't understand why you would need any of the other directories that you enter under "include files"  nor "Libraries".

Title: Re: FP - configuration
Post by: jacmoe on March 01, 2017, 10:35:24 am
For a while RHIDE's debugger worked better, but that is long ago (15 years). Borland /NEVER/ release the pascal source to FPC, Free Vision is a parallel development based on a 3rd party graphical "vision" clone, which might have origins in the C++ code.
That's pretty impressive :)
It is really, really close to the real thing. (And by that, I mean that it looks and feels better)
(( I am using Turbo Vision right now - both Borland C++ 3.1 and Turbo Pascal 7 - in DosBox for doing retro graphics (Mode13) ))

I don't understand why you would need any of the other directories that you enter under "include files"  nor "Libraries".
Neither do I, because I opened 'fpc.cfg' to see what I could add, because I got link errors - but now that I figured out that I need to run fp from the right directory, I will probably remove them.
Title: Re: FP - configuration
Post by: jacmoe on March 03, 2017, 11:15:31 pm
Now, after I - again! messed up my Fpcupdeluxe Lazarus/FPC installation, I went ahead and tested the FP IDE from scratch, I managed to make FP work using just these 3 lines in Directories - Unit Directories, and nothing else:

Units:
Code: Pascal  [Select][+][-]
  1. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget
  2. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget/*
  3. /home/jacmoe/fpcupdeluxe/fpc/units/$fpctarget/rtl
  4.  

That's pretty neat.
TinyPortal © 2005-2018