newbie: yet another "cannot find Forms unit" lazarus / 1-Linux ---------------------------------------------------------------------- JonBondy · 2010-05-30 06:37 I'm new to Linux, Kubuntu, and Lazarus, but not to Delphi. I've read a lot of articles about the "cannot find Forms" problem, but I still cannot get past this simple problem.  Would someone be willing to help me, step by step?  I have the feeling that all it would take is one small tweak. I am running Kubuntu 64; I wonder if that might be part of the problem. ---------------------------------------------------------------------- JonBondy · 2010-05-30 09:11 I tried to rebuild Lazarus.  It completed CodeTools, after which it tried to compile the Hello example.  It then said it can't create object file units/x86_64-linux/hello.o I have no idea what is going on... ---------------------------------------------------------------------- JuhaManninen · 2010-05-30 10:23 Quote from: JonBondy on May 30, 2010, 11:11:34 amI tried to rebuild Lazarus.  It completed CodeTools, after which it tried to compile the Hello example.  It then said it can't create object file units/x86_64-linux/hello.o I have no idea what is going on... Start the newly built Lazarus. It should be in your home dir. Create or copy test programs to your home dir as well. You need write access for them while compiling. Also check paths in Environment -> Options. Juha ---------------------------------------------------------------------- JonBondy · 2010-05-31 17:51 The paths in Environment, Options, Lazarus directory seem fine to me; and when I change them, I get errors saying that the directory "does not look correct" and says that there should be an "lcl" folder there.  There is an "lcl" folder where the current path is pointing, but the compiler does not work.  I'm confused. ---------------------------------------------------------------------- JonBondy · 2010-05-31 18:36 When I search for "forms.o", I find it here: file:///usr/lib/lazarus/0.9.28.2/lcl/units/x86_64-linux/forms.o but if I try to add that path to Lazarus, Environment, Options, Files, I get a warning that the directory is not "correct".  And yet Lazarus cannot find the Forms class/file. I cannot fathom the UI for the Files.  There does not seem to be any way to delete an incorrect entry nor to edit an entry. ---------------------------------------------------------------------- Marc · 2010-06-02 05:39 Quote from: JonBondy on May 31, 2010, 07:51:03 pmThe paths in Environment, Options, Lazarus directory seem fine to me; and when I change them, I get errors saying that the directory "does not look correct" and says that there should be an "lcl" folder there.  There is an "lcl" folder where the current path is pointing, but the compiler does not work.  I'm confused. The lazarus directory is the directory with the lazarus source. This directory contains at least the following sub directories [lcl, ide, components, debugger, languages] If not, then that is not the lazarus source directory Same for the FPC source directory. Is should contain at least the following sub directories [compiler, packages, rtl] If not then that is not the FPC source directory. ---------------------------------------------------------------------- Marc · 2010-06-02 05:41 Quote from: JonBondy on May 31, 2010, 08:36:22 pmWhen I search for "forms.o", I find it here: file:///usr/lib/lazarus/0.9.28.2/lcl/units/x86_64-linux/forms.o but if I try to add that path to Lazarus, Environment, Options, Files, I get a warning that the directory is not "correct".  And yet Lazarus cannot find the Forms class/file. I cannot fathom the UI for the Files.  There does not seem to be any way to delete an incorrect entry nor to edit an entry. Normally you should not need to add these. Does your project require the LCL package ? IOW, how did you create your project. What compiler are you using ? 32 or 64 bit. Is this the first FPC and/or Lazarus you installed or did you have an older version ? ---------------------------------------------------------------------- JonBondy · 2010-06-06 09:27 Marc: Thanks for your help! I didn't think that I would have to fiddle with any paths in order to access the "system" units; and all of the units in my test application are in the same folder. I don't know if my project needs LCL: I'm just trying to convert my first simple Delphi project to Lazarus, and it immediately says that it can't find "Forms", so I'm stuck right out of the gate. I have loaded the 32-bit compiler on a laptop (running 32-bit Kubuntu) and a 64-bit compiler on a desktop (running 64-bit Kubuntu) and both [mis-]behave exactly the same. This is a brand new install on a brand new Kubuntu.  I have uninstalled and reinstalled repeatedly. Jon ---------------------------------------------------------------------- JuhaManninen · 2010-06-06 11:07 Quote from: JonBondy on June 06, 2010, 11:27:04 amI don't know if my project needs LCL: I'm just trying to convert my first simple Delphi project to Lazarus, and it immediately says that it can't find "Forms", so I'm stuck right out of the gate. Every project converted from Delphi needs LCL. Does a new project created with Lazarus work? When you get it working, next you could try the Delphi converter in Lazarus SVN trunk for your project. Juha ---------------------------------------------------------------------- JonBondy · 2010-06-07 17:10 Juha: Thanks for your help! Interesting.  If I create a new application, add a button, and show a message when the button is clicked, it all works.  And this new application even uses the "forms" unit, so this new project can "see" that unit. But my old code, which also uses the "forms" unit, cannot find the "forms" unit.  Puzzling.  Frustrating.  But at least I can see that something is working.  If I only could figure out what is different between the two projects.  The failing project was created using the Tools, Convert Delphi Project To Lazarus menu item Jon ---------------------------------------------------------------------- JuhaManninen · 2010-06-08 02:39 You must add dependency for LCL manually when using an old version of converter. Please try the Lazarus SVN trunk version. It has got many improvements. Juha ---------------------------------------------------------------------- JonBondy · 2010-06-14 15:53 Juha: Thanks.  I don't know what "dependency"  is.  I don't know why I would be using an "old" version of the converter, since it was installed just a week or so ago.  What is "svn" or "trunk"?  Where are these versions stored?  Sorry.  I'm new to all of this. Jon ---------------------------------------------------------------------- JuhaManninen · 2010-06-14 23:49 Quote from: JonBondy on June 14, 2010, 05:53:56 pmThanks.  I don't know what "dependency"  is.  I don't know why I would be using an "old" version of the converter, since it was installed just a week or so ago.  What is "svn" or "trunk"?  Where are these versions stored?  Dependency: Open Project -> Project Inspector. There is Required Packages section. On top there is "+" button. Click it, select New Requirement tab, Package name = LCL. SVN is the revision control system taking care of source code. Trunk is the "bleeding edge" development branch. But don't worry, it is very usable and stable and has many improvements. I recommend trying it. http://wiki.lazarus.freepascal.org/Getting_Lazarus#Using_SVN The converter in Lazarus 0.9.28 is old compared to the latest SVN trunk version. Juha