[fpc-pascal] Re: building universal binary
Ken G. Brown
kbrown at mac.com
Tue Feb 3 23:33:24 CET 2009
> > Have a Pascal program calling some C code from a static library I
> > build in a separate project so I can use the debugger.
>
>You can also build it in a separate target of the same project and
>then change the target-specific flags for that C library (as in the
>"FPC-C-C++ Carbon Application 2.2.0" template).
Does this method still allow running gdb on the C code?
> > 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)
>
>myapp.app is a folder (or more specifically, a bundle). The actual
>program is .../myapp/build/Release/myapp.app/Contents/MacOS/myapp
Yep, finally figured that out.
> > 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.
Now my latest build appears to allow running under Rosetta, but incorrectly.
> > 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.
>
>You have to go to the project's build settings for the configuration
>that you are building (presumably "release"), and then set the
>"Architectures" setting (the second from the top) to "Standard (32-bit
>Universal)". This works at least for me with the "FPC-C-C++ Carbon
>Application 2.2.0" template.
>
Yes is working now for me too, not sure what i did at this point to make it happen.
Thx
>Jonas
More information about the fpc-pascal
mailing list