On 03 Feb 2009, at 20:21, Ken G. Brown wrote:

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).

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

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.

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.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to