Recent

Author Topic: A beginners problem.  (Read 8705 times)

knutendre

  • Newbie
  • Posts: 2
A beginners problem.
« on: October 01, 2011, 05:15:26 pm »
I have just installed Lazarus on a MacBook Air (2010), running Lion. I have according to instructions loaded three dmgs and installed them all. I can start Lazarus without any error messages, and I see a form and I can add a Tbutton to my form. Everything seems well. Then when I want to add some code to my Tbutton (by clicking it) I stops and I get the following error message "Error in TDefaultComponentEditor ...", see attachment 1. Furter in a message box it says
"---------------------------------------------
Developer/lazarus/lcl/lclclasses.pp(32,10) Error: unit not found: Classes
"

Can anybody out there help a complete beginner? I would much appreciate to come over these start-problems so I can do some coding.

Best regards
Knut.E

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: A beginners problem.
« Reply #1 on: October 01, 2011, 05:38:15 pm »
Hi Knutendre,
You need to set your paths in menu|environment|options. Go to the "paths" section and supply the directory where fpc.exe is located (usually /fpc/bin i think). Also check for the path setting to the lazarus directory.

First try simply saving your project. This may be the actual problem.

Enjoy
« Last Edit: October 01, 2011, 05:48:04 pm by CaptBill »

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: A beginners problem.
« Reply #2 on: October 01, 2011, 05:44:02 pm »
Which version of Lazarus / Free Pascal do you use?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: A beginners problem.
« Reply #3 on: October 01, 2011, 06:26:06 pm »
Go to the "paths" section and supply the directory where fpc.exe is located (usually /fpc/bin i think).

On Mac OS X, the default is /usr/local/bin/fpc

Mischi
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

jwdietrich

  • Hero Member
  • *****
  • Posts: 1036
    • formatio reticularis
Re: A beginners problem.
« Reply #4 on: October 01, 2011, 08:17:30 pm »
Did you also load FPC and FPCsrc? On Mac OS X, it is a usual mistake to only load Lazarus and not the corresponding FPC and FPCsrc archives.

Correct versions are:

For Lazarus 0.9.30.2RC1: fpcsrc 2.4.4 and fpc 2.4.4
For Lazarus 0.9.30: fpcsrc 2.4.2 and fpc 2.4.2

The links are provided directly in the corresponding Lazarus downloads folder at SourceForge.

And ensure to correctly set the paths as noted above.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.6 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

MonkeyChap

  • Newbie
  • Posts: 4
Re: A beginners problem.
« Reply #5 on: October 28, 2011, 10:51:48 pm »
Hello,

I'm having exactly the same problem. There is another issue (maybe this is the cause) in that FPC is not fully installing on Lion. There is no /usr/local/share/fpcsrc folder, and I get a warning about this when Lazarus starts up.

As someone is bound to ask; yes, I have run the fpc 2.4.4 installer and the fpc-xcode 2.4.4. installer (in that order) then installed Lazarus (0.9.3rc2).

Ian

Bart

  • Hero Member
  • *****
  • Posts: 3551
    • Bart en Mariska's Webstek
Re: A beginners problem.
« Reply #6 on: October 29, 2011, 05:04:16 pm »
IIRC the fpc installer installs only the binaries?
You must install/have the fpc sources, or the codetools from Lazarus won't work.
(You can download the sources, unpack, and point Lazarus to them. That should be enough.)

Bart

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: A beginners problem.
« Reply #7 on: October 29, 2011, 05:58:49 pm »
You can download a DMG with the Free Pascal source code from the SourceForge of Lazarus:

http://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%20i386/Lazarus%200.9.30/

MonkeyChap

  • Newbie
  • Posts: 4
Re: A beginners problem.
« Reply #8 on: November 01, 2011, 09:06:38 pm »
Hi Kuntendre,

Many thanks for that. When combined with this advice:

http://www.lazarus.freepascal.org/index.php?topic=10834.0

...it solves the problem.

Ian