Installing Lazarus and FPC on Mac OS X 10.6 lazarus / 9-Editor ---------------------------------------------------------------------- Anemaat · 2010-12-08 22:04 Hello, I newly installed Lazarus and FPC on my Mac Mini. When trying to run the standard empty window, I get the error message "can't find unit interfaces used by project1" How can this be solved ? Hubert ---------------------------------------------------------------------- Phil · 2010-12-09 00:27 You don't say what version of Lazarus you're using, but one thing to check the Environment Options. Make sure the first 3 paths to the Lazarus and Free Pascal sources and binaries are set properly. Thanks. -Phil ---------------------------------------------------------------------- dderbes · 2010-12-20 04:37 I have exactly the same problem as Hubert. Just installed FPC 2.2.4, Lazarus 0.9.28.2 beta, i386-darwin-carbon, running Mac OS X 10.6.5. I tried to compile unit 1, and was told that the compiler can't find the unit interfaces. Things seem to be in the right place (Lazarus directory in /Developer/lazarus, compiler path is /usr/local/bin/ppc386, and FPC source directory is /usr/local/share/fpcsrc/.) Clearly I'm doing something wrong, but I have no idea how to fix it. Any suggestions would be most welcome. ---------------------------------------------------------------------- Vincent Snijders · 2010-12-20 09:35 What is the used widget set of the project. See the compiler options. ---------------------------------------------------------------------- dderbes · 2010-12-20 14:20 Thanks for your reply. In Compiler Options, most are blank. The LCL Widget Type is the default, (carbon (beta)). Maybe the path needs to be set for the Libraries or the Other Unit Files? ---------------------------------------------------------------------- Vincent Snijders · 2010-12-20 14:45 Does the project depend on the LCL (LCL is set as a requirement in the project inspector)? ---------------------------------------------------------------------- dderbes · 2010-12-20 17:09 Yes. I'm just trying to play with the examples, but nothing much is working. The code reads (I commented out the IFDEF directives as I am trying to get it to work as a standard Aqua thing): program project1; {$mode objfpc}{$H+} uses (*  {$IFDEF UNIX}{$IFDEF UseCThreads}   cthreads,   {$ENDIF}{$ENDIF}  *)   Interfaces, // this includes the LCL widgetset   Forms, Unit1, LResources   { you can add units after this }; {$IFDEF WINDOWS}{$R project1.rc}{$ENDIF} begin   {$I project1.lrs}   Application.Initialize;   Application.CreateForm(TForm1, Form1);   Application.Run; end.          The project inspector looks like Files--project1.lpr (and) -- unit1.pas Required Packages -- LCL Is there some path I have to specify as to where the compiler can find things? I just did the standard install... This is really a little frustrating. Examples should just work. Thanks very much for your help. ---------------------------------------------------------------------- Vincent Snijders · 2010-12-20 18:59 Please, increase the verbosity in the compiler options, add in the (-va) option. Then copy all (including hidden messages) into a text file, zip it and attach it to this topic, so we can inspect why the compiler doesn't work as expected. ---------------------------------------------------------------------- dderbes · 2010-12-21 13:59 Again, many thanks. The messages indicate that many things are not found, but the proximate cause of the compilation's abort seems to be not finding interfac.*. Here's the zipped messages (including hidden messages.) ---------------------------------------------------------------------- Vincent Snijders · 2010-12-22 08:25 dderbes, you are using the fpc 2.4.2 compiler with Lazarus 0.9.28.2, which has been compiled with fpc 2.2.4. That is why the compiler refuses the installed interfaces.ppu and cannot find a correct interfaces.ppu. Code: [Select]PPU Loading /Developer/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu PPU Name: /Developer/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu PPU Invalid Version 91 ---------------------------------------------------------------------- dderbes · 2010-12-22 13:06 Thank you very much for unraveling this mystery. I assume I should either upgrade Lazarus or downgrade the compiler. I'll try the latter first, and let you know how that goes. Again, many thanks for putting in the time to wade through the file and figuring this out. David Derbes ---------------------------------------------------------------------- Vincent Snijders · 2010-12-22 13:26 Yes, get the Lazarus dmg from the snapshot page and try to install that one. ---------------------------------------------------------------------- dderbes · 2010-12-22 14:13 The snapshot install seems to have fixed everything, thank you very much! A question: At the snapshot page there are two closely related files, lazarus and lazarus fixes. I got them both but installed only the later dot release. I assume that the one with the earlier number and the extra .3. is the third iteration of the last release? I don't see readme files for these things, but the packages are both labeled "lazarus". Sorry to be stupid about this. ---------------------------------------------------------------------- Vincent Snijders · 2010-12-22 14:37 See the wiki for an explanation about the Lazarus version numbers. ---------------------------------------------------------------------- dderbes · 2010-12-22 14:39 Thanks again for being so helpful to a clueless newbie! ---------------------------------------------------------------------- dderbes · 2010-12-29 19:58 Another question, if I can trouble the experts here. I am coming to Lazarus from a long time (twenty plus years ago) with Turbo Pascal. Using Mac OS X 10.6.5, Lazarus Version 0.9.29, FPC version 2.4.2, i386-darwin-carbon, default widgets (carbon). I have now written and successfully run a couple of dinky programs in console mode. What happens is that up pops a typical unix console window ("Terminal" in OS X) , with the output, waiting for a readln. This is fine, but I miss the old Turbo Pascal behavior, namely, running a program within the IDE brings up a console window within the IDE itself, a runtime environment that doesn't shell out to the OS. In the Lazarus Wiki there is a suggestion that this can be done, by going to Run->Run Parameters... and check the box "Use launching application". Well, I have done all that, but there is absolutely no perceptible difference in running the program whether or not that box is checked. Should there be a difference? Thanks in advance.