Recent

Author Topic: Can't get it to work on a Mac  (Read 4645 times)

Arbee

  • Full Member
  • ***
  • Posts: 223
Can't get it to work on a Mac
« on: December 23, 2007, 05:28:05 pm »
Hello,
I've been using Lazarus for a couple of weeks now on a Windows machine, with the promise of real cross platform development.
I've now installed it on my iMac (OS X 10.4.11), but unfortunately it does not work.
It installs allright and Lazarus starts and works.  But any compile I try to make fails with the following messages in Xterm

Free Pascal Compiler version 2.2.0 [2007/11/14] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Darwin for i386
Compiling project1.lpr
PPU Loading /usr/local/share/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu
PPU Source: interfaces.pas not found
Recompiling Interfaces, checksum changed for InterfaceBase
Fatal: Can't find unit Interfaces used by project1

I've seen more topics around this subject and they all revolve around not having the right LCL compiled.
Well  ... I tried it:  
* built LCL,
* built the whole lot (which - incidentally - gave me a link error),
* built and tried carbon,
* built and tried gtk,
* built and tried gtk2,
* I installed from sourceforge,
* I installed the latest daily snapshots ...

But to no avail.  Always the same message.  It simply does not work.

Anybody else had this and knows how to crack it?  

(Right now, I'm inclined to return to Java/Netbeans again)
1.0/2.6.0  XP SP3 & OS X 10.6.8

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: Can't get it to work on a Mac
« Reply #1 on: December 23, 2007, 06:03:58 pm »
Quote from: "RJBosch"
Free Pascal Compiler version 2.2.0 [2007/11/14] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Darwin for i386
Compiling project1.lpr
PPU Loading /usr/local/share/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu
PPU Source: interfaces.pas not found
Recompiling Interfaces, checksum changed for InterfaceBase
Fatal: Can't find unit Interfaces used by project1


The first thing I would try would be to install the current snapshot (3 .dmg's). The version you're using is about 1 month old, so try a different version to see if this problem is just a one-off.

It's probably a good idea to remove the old versions of FPC and Lazarus. There's a script here that shows what files need to be removed:

http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips#Uninstalling_Lazarus_and_Free_Pascal

Note the version number that you'll need to change for a couple files.

See if that makes any difference and please report back here.

Thanks.

-Phil

Arbee

  • Full Member
  • ***
  • Posts: 223
Can't get it to work on a Mac
« Reply #2 on: December 23, 2007, 07:10:00 pm »
I report back with embarrassment, 'cause I got it working not 15 minutes after I posted my intial entry.

Embarrassed for the reason why it didn't work so far .....

The first time that I got the message I took it that it could indeed not find the units and I added them in the compiler options.  I added the sources (the .pp files) though, which FPC then dutifully started to compile.  That in the end did not really work either, but in the mean time several new .ppu files (among which interfacebase.ppu) were around in my temporary output dir.  And you can build, uninstall and install till kingdom come ...  They stay there and apparently take precedence at compiling with version differences as a result.  

After clearing out this directory it all of a sudden worked.  At least under gtk.  Carbon compiles OK but gives me a linker error. So who knows I will open a new topic in a couple of days.  If only I will solve every one I post within 15 minutes myself !
 
 :)
1.0/2.6.0  XP SP3 & OS X 10.6.8

Phil

  • Hero Member
  • *****
  • Posts: 2750
Can't get it to work on a Mac
« Reply #3 on: December 23, 2007, 07:56:17 pm »
Quote from: "RJBosch"
Carbon compiles OK but gives me a linker error. So who knows I will open a new topic in a couple of days.  If only I will solve every one I post within 15 minutes myself ! :)


With Carbon, be sure to check Pass Options to the Linker on the Linker tab and enter -framework carbon in the text box.

Thanks.

-Phil

 

TinyPortal © 2005-2018