[fpc-pascal] building universal binary

Ken G. Brown kbrown at mac.com
Tue Feb 3 20:21:11 CET 2009


Mac OS X 10.5.6, fpc 2.2.2, Xcode 3.1.2

Have a Pascal program calling some C code from a static library I build in a separate project so I can use the debugger.

I've set Xcode to use gcc 4.0 targeting 10.4 for intel, and gcc 3.3 targetting 10.3.9 for PowerPC in both projects.

So far I am basically using the fpc user defined options that came with the template for building for calling C functions.

Do I need to add some fpc options in order to properly compile for a universal binary?

I looked at my App using lipo -info fromTerminal and get the following error:
lipo: Can't map input file: .../myapp/build/Release/myapp.app ((os/kern) invalid argument)

As well, in Finder Get Info for my app, the 'open using Rosetta checkbox is greyed out and I cannot select it. Activity Monitor of course shows an intel program but i need to deploy to PowerPC running 10.3.9.

If I look at my 'C' library project product with lipo, I get Architectures in the fat file: ...../libkbCarbonLib.a are: i386 ppc  

What else do I need to do in order to generate a universal binary? Do I need to run the fpc ppc version somehow for the ppc side of tings? I suspect so but cannot find what to do.

Any tips appreciated.

Thx,
Ken G. Brown



More information about the fpc-pascal mailing list