Recent

Author Topic: First Pascal Application  (Read 5516 times)

Jon Trepte

  • New member
  • *
  • Posts: 9
First Pascal Application
« on: October 10, 2021, 08:34:10 am »
I'm a complete newbie to Lazarus but proficient in Delphi 6. I've installed the IDE and FPC. I create a new Application but get an error. See attachment.
Something seems not to have been setup properly.
Please help as this looks fantastic
Jon

Awkward

  • Jr. Member
  • **
  • Posts: 96
Re: First Pascal Application
« Reply #1 on: October 10, 2021, 08:59:31 am »
Looks like you uses different version of compiled units from FPC and Lazarus. Better to install full Lazarus distrib which comes with proper FPC version. OR you will need to recompile units ("Build All" is our all)
next, in future, you can use fpcupdeluxe tool https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases to install fpc/lazarus version you need

Thaddy

  • Hero Member
  • *****
  • Posts: 11085
Re: First Pascal Application
« Reply #2 on: October 10, 2021, 09:03:25 am »
FYI the same happens in Delphi when you try to compile and link against DCU's that are compiled in a different Delphi version. Both DCU's and FPC's PPU's are version dependent, not major version but even minor version.
I also would recommend fpcupdeluxe or a full Lazarus distro.
In the case of Linux many distro's contain a fairly recent Lazarus and FPC.
« Last Edit: October 10, 2021, 09:06:40 am by Thaddy »
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #3 on: October 10, 2021, 10:34:27 am »
Many thanks for your replies. I did install Lazarus-2.2.0RC1-x86_64-macosx and  fpc-3.2.0.intel-macosx as they looked the latest.
Are these the recommended files. If not what should I be using?
Thanks again.

Thaddy

  • Hero Member
  • *****
  • Posts: 11085
Re: First Pascal Application
« Reply #4 on: October 10, 2021, 10:43:37 am »
I would advise against using RC - release candidate - versions unless you are an advanced user.
If you install with fpcupdeluxe, simply select "stable.git" for both lazarus and Fpc.
Top the line is trunk, but trunk versions need very regular updates (at least weekly, I do it more daily but I am a pensionado idiot) and are not supported for that reason.
The current stable version of Fpc is 3.2.2 although that may differ a version for MacOs.

EDIT: and indeed it does:
The Lazarus version is indeed an RC.
https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20x86-64/Lazarus%202.0.12/
« Last Edit: October 10, 2021, 10:57:33 am by Thaddy »
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #5 on: October 10, 2021, 10:49:10 am »
I will revert to 2.2.12 and try again. I just hit the latest version link but I didn't realise that RC stood for release candidate.
Thanks

Thaddy

  • Hero Member
  • *****
  • Posts: 11085
Re: First Pascal Application
« Reply #6 on: October 10, 2021, 10:50:35 am »
I editted my post. For MacOs the advertised selection is indeed a RC... See link.
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #7 on: October 10, 2021, 11:03:32 am »
OK I've now downgraded to 2.0.12 and I now get the attached error message when starting Lazarus.

Handoko

  • Hero Member
  • *****
  • Posts: 4429
  • My goal: build my own game engine using Lazarus
Re: First Pascal Application
« Reply #8 on: October 10, 2021, 11:11:06 am »
It seems you need to do a clean install of your Lazarus. There were discussions how to do it on Linux. Not sure about MacOs, but they should be similar.

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #9 on: October 10, 2021, 11:37:52 am »
I now get the following error

dbannon

  • Hero Member
  • *****
  • Posts: 1775
    • tomboy-ng, a rewrite of the classic Tomboy
Re: First Pascal Application
« Reply #10 on: October 10, 2021, 12:32:35 pm »
Jon, sorry, looks like the people who really know their stuff have all signed off.

Look, installing Lazarus is a pretty easy process, right now you are suffering for running too many different install attempts. Like Handoko said, you need to remove the distractions !

Each of your attempts have probably left bit and pieces everywhere, I strongly suggest you make an effort to try and find those bits and remove them all and then, only when you are sure all the distractions are gone try one of the install methods again. Just one. Any one will work fine.

https://wiki.freepascal.org/Installing_Lazarus_on_macOS

-- Discussion Mode, don't read if your head is spinning  --
Personally, I have a FPC322 (322 is a good idea on the Mac) install and I build Lazarus from source. Lots of people seem to think thats hard but building apps is what FPC/Lazarus is all about !   Its one command line and running that command tests it all for you. Anyway, choose your model and stick with it !  2.0.12 should be fine but Fixes 2.2 will have a few extra tweaks for the Mac.

Again. personally, I prefer an install where I know where everything actually is.

Good luck !

Davo

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Thaddy

  • Hero Member
  • *****
  • Posts: 11085
Re: First Pascal Application
« Reply #11 on: October 10, 2021, 12:36:50 pm »
Davo, MacOs has still issues that are not resolved.
The average programmer productivity is 4-5 hours per day. Peak performance 72 hours for short bursts. MTBF is 1 second or less.

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #12 on: October 10, 2021, 12:57:04 pm »
Thanks dbannon
 I looked in the web for instructions but all were confusing referring to folders in /etc/Application Support which did not exist.
I will try again but thanks again for spending your time.
If you have a link to do this I would be very grateful. :(
Jon

Handoko

  • Hero Member
  • *****
  • Posts: 4429
  • My goal: build my own game engine using Lazarus
Re: First Pascal Application
« Reply #13 on: October 10, 2021, 01:16:15 pm »
This is how to do a full Lazarus re-installation on Linux:
https://forum.lazarus.freepascal.org/index.php/topic,35743.msg236869.html#msg236869

For your information you first need to enable show hidden file on your system:
https://www.ionos.com/digitalguide/server/configuration/showing-hidden-files-on-a-mac/

Jon Trepte

  • New member
  • *
  • Posts: 9
Re: First Pascal Application
« Reply #14 on: October 10, 2021, 01:20:01 pm »
thank you Handoko

 

TinyPortal © 2005-2018