"Identifier not found"? lazarus / 13-General ---------------------------------------------------------------------- ferentix · 2005-11-01 22:00 First off, I guess HI! My registration e-mail isn't arrived yet, so I'm posting as guest. Anyways, I'm having a compilation problem. I'm using the Lazarus install that comes with GLScene and Quark pre-installed, and began putting together the example spinning cube program on page 7 of Skinhat's GLScene tutorial. It all compiles and runs fine (The cube is rendered when the program is run) at every stage up until adding the event for progress (OnProgress). Basically, I add that event through the Object Inspector, using the code given in the tutorial: Code: [Select]GLCube1.TurnAngle := GLCube1.TurnAngle + deltaTime * 100; Then try the final compile/run. However, I get the error Code: [Select]Identifier not found "GLCube1" I have checked about a dozen times that this is the exact same name used for the cube in the "Name" property. It is definitely the same... ideas?  :? Source below: Code: [Select] unit Cubespin; {$mode objfpc}{$H+} interface uses   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, GLScene,   GLWin32Viewer, GLCadencer, EditBtn, GLThorFX; type   { TForm1 }   TForm1 = class(TForm)     GLCadencer1: TGLCadencer;     GLCamera1: TGLCamera;     GLLightSource1: TGLLightSource;     GLScene1: TGLScene;     GLSceneViewer1: TGLSceneViewer;     procedure GLCadencer1Progress(Sender: TObject; const deltaTime,       newTime: Double);     procedure GLCube1Progress(Sender: TObject; const deltaTime, newTime: Double       );     procedure GLThorFXManager1CalcPoint(Sender: TObject; PointNo: integer;       var x: single; var y: single; var z: single);   private     { private declarations }   public     { public declarations }   end; var   Form1: TForm1; implementation { TForm1 } procedure TForm1.GLCadencer1Progress(Sender: TObject; const deltaTime,   newTime: Double); begin end; procedure TForm1.GLCube1Progress(Sender: TObject; const deltaTime,   newTime: Double); begin   GLCube1.TurnAngle := GLCube1.TurnAngle + deltaTime * 100; end; procedure TForm1.GLThorFXManager1CalcPoint(Sender: TObject; PointNo: integer;   var x: single; var y: single; var z: single); begin end; initialization   {$I cubespin.lrs} end. Oh, I already tried putting "GLCube1: TGLCube;" into the "Type" section (which to be honest was just a stab in the dark). It just tells me "Identifier not found "TGLCube"... which is even more strange, as it doesn't seem to have any problem with "GLCube1" at that point...  :x [/url] ---------------------------------------------------------------------- matthijs · 2005-11-02 15:06 You should not put the definition of GLCube1 in the type section but either make it a property of your form or place it in the var section. Then depending on the place you have put it create an instance of it by putting Code: [Select]   GLCube1 := TGLCube.Create; in the OnCreate event of your form or in the initialization section. Then in the OnDestroy event or the finilazation section you have to free it by putting: Code: [Select]   GLCube1.Free; again the place is depending on the place of your definition of TGLCube. ---------------------------------------------------------------------- Anonymous · 2005-11-02 20:08 OK, I'll try that. Thanks ---------------------------------------------------------------------- ferentix · 2005-11-02 21:03 Whoops, sorry, that last post was me... It still doesn't work! It simply says 'Identifier not found "TGLCube"'... so for some reason it doesn't seem to recognise the TGLCube as a declared type... why could this be? GLScene is definitely in the "Uses" section of the unit... Or are the basic geometry types declared in a different file? The real strange thing is that the cube is rendered perfectly fine without doing this, but if I want to add a line of code referring to it I get the error. For example, the cameras' "target" is "GLCube1" and there is no problem with that, even though I haven't declared GLCube1 in Var or anywhere manually... :shock: ---------------------------------------------------------------------- Marc · 2005-11-08 11:41 Quote from: "ferentix"First off, I guess HI! My registration e-mail isn't arrived yet, so I'm posting as guest. If you didn't received a confermatioin email, oyur email is probably blocked/spam filtred. Look at your spamfilters or try a different email account ---------------------------------------------------------------------- suicide0 · 2012-04-12 10:57 you have to put "globjects" into to "uses" part brgds Sui