Recent

Author Topic: Cannot find unit Classes  (Read 19744 times)

djogony

  • Newbie
  • Posts: 4
Cannot find unit Classes
« on: January 27, 2007, 11:39:08 pm »
Hello everyone,

I installed lazarus without a glitch on my iMac, but now I am trying to do the same on a friend's MacBook.

I made sure fink and GTK stuff is up to date, downloaded and installed today's (Jan, 27th, 2007) snapshots.

I can compile a plain project, but if I try to drop a button and double click on it to assign an event handler to the OnClick event I get a message that unit Classes cannot be found.

I made sure that I am pointing to the proper fpcsrc directory (/usr/local/share/fpcsrc)

Any ideas?

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Cannot find unit Classes
« Reply #1 on: January 28, 2007, 04:14:40 am »
Quote from: "djogony"
I can compile a plain project, but if I try to drop a button and double click on it to assign an event handler to the OnClick event I get a message that unit Classes cannot be found.


Can't reproduce that here with yesterday's snapshot.

Could you post the exact wording of the error message? That might be useful.

Thanks.

djogony

  • Newbie
  • Posts: 4
RE: Re: Cannot find unit Classes
« Reply #2 on: January 28, 2007, 03:03:39 pm »
Here are the exact steps and error messages.
1) Open lazarus, drop a button on the form
2) Double click on the button
3) Error message comes up
"The component editor of class "TDefaultComponentEditor has created the error:
"Unable to find method. Plz fix the error shown in the message window."
4) The error in the message window says:
/usr/local/share/lazarus/lcl/lclclasses.pp(32,3) Error: unit not found: Classes

fpcsrc (same date) is installed and located in /usr/local/share/fpcsrc

fpc itself can compile a plain project that requires classes unit. If I just open lazarus, click build - it builds it and I can run it. If I rename classes to something else just to make sure fpc is using classes - the project fails to compile.

Looks like a strictly lazarus IDE issue.

Please let me know if you figure something out. I will be more than happy to try new build or do more tests.

Thank you.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: RE: Re: Cannot find unit Classes
« Reply #3 on: January 28, 2007, 03:40:56 pm »
Quote from: "djogony"
fpc itself can compile a plain project that requires classes unit. If I just open lazarus, click build - it builds it and I can run it. If I rename classes to something else just to make sure fpc is using classes - the project fails to compile.


The error is occuring in TMainIDE.OnPropHookMethodExists but I don't know enough about how the IDE works to make a guess at what's happening.

Maybe try reinstalling both FPC compiler and FPC source. Classes is an FPC unit, not a LCL unit. FPC's compiled units are in /usr/local/lib/fpc.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: RE: Re: Cannot find unit Classes
« Reply #4 on: January 29, 2007, 08:01:07 am »
Is a powerpc of intel mac (and consequently, are you using fpc 2.0.4 or fpc 2.1.1)?

djogony

  • Newbie
  • Posts: 4
RE: Re: RE: Re: Cannot find unit Classes
« Reply #5 on: January 29, 2007, 04:02:07 pm »
This is Inter Mac, FPC 2.1.1 same build dates as lazarus.

On my intel Mac I have FPC 2.1.1 and lazarus working without any problems.

I am using builds form Jan, 11th, 2007 - he is using the builds from Jan, 27th, 2007

So it cannot be any sort of major issue with FPC 2.1.1 as my lazarus works fine with it.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: RE: Re: Cannot find unit Classes
« Reply #6 on: January 29, 2007, 04:20:43 pm »
Let him try with your installer files. I think something got broken last week or so.

djogony

  • Newbie
  • Posts: 4
RE: Re: RE: Re: Cannot find unit Classes
« Reply #7 on: January 29, 2007, 08:19:28 pm »
That build worked great on his system as well so it must be something very recent that got broken.

Thank you.

Raid

  • New Member
  • *
  • Posts: 25
RE: Re: RE: Re: Cannot find unit Classes
« Reply #8 on: January 30, 2007, 06:29:05 pm »
It's not just you, I'm getting the cannot find unit Classes.  This is due to it not finding the right 'FPC' sources? I'm guessing it's not loading the UnitLinks in the Input Histories? I haven't dug much but, it seems to fail at scanning for 'system ' in the FPCConfigCache XML "UnitLinks" which does not exist in my inputhistory.xml.. Does that help?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2671
RE: Re: RE: Re: Cannot find unit Classes
« Reply #9 on: January 31, 2007, 12:35:15 pm »
there there might be problems with parsing the output of fpc 2.1.1 r6176 therefore it cannot find the system unit (or any other fpc unit). This may affect codejuming, code completion and creating events.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

nclark

  • Newbie
  • Posts: 1
RE: Re: RE: Re: Cannot find unit Classes
« Reply #10 on: December 09, 2008, 12:50:19 am »
Hi
I have this evening (08 dec 2008) downloaded Lazaruz on ubuntu 32 bit pc.Have also error "TDefaultComponentEditor" . Unable to find method. I get this when I double click on a button I have added to a form. Have delphi experience but no Lazaruz experience. Help please!!

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Cannot find unit Classes
« Reply #11 on: December 22, 2008, 12:59:19 pm »
For what method did it give this error?

Did you install the fpc sources?

Sandrix

  • New Member
  • *
  • Posts: 32
    • My Portfolio
Re: Cannot find unit Classes
« Reply #12 on: December 23, 2008, 11:53:02 am »
I'm having exactly the same problem with Classes, the only difference is that in my case the error occurs only when I try to use Tbutton's onClick  event.
No Idea what's wrong... :-\

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Cannot find unit Classes
« Reply #13 on: December 23, 2008, 11:55:14 am »
Sandrix, did you install the fpc sources?

Sandrix

  • New Member
  • *
  • Posts: 32
    • My Portfolio
Re: Cannot find unit Classes
« Reply #14 on: December 23, 2008, 02:41:14 pm »
Yes I deffenatly did :) I checked the ppu classes file and it's right in it's place(where it should be). Everything works fine with other elements(like Tmemo Tedit Tradiobutton etc)... Problem occurs only when I try to use Tbutton...

 

TinyPortal © 2005-2018