• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -arch ppc works on Xcode 3.x, but not on 2.5.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -arch ppc works on Xcode 3.x, but not on 2.5.


  • Subject: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 20 Jan 2009 16:07:47 -0800

On Tue, Jan 20, 2009 at 4:00 PM, David Springer <email@hidden> wrote:
> Folks,
> I have a project that needs to build under both Xcode 2.5 and 3.x.  Under
> 3.x, everything builds fine.  Under 2.5, I get a warning:
> ld: warning fat file:/Users/me/blah/foo.dylib does not contain an
> architecture that matches the specified -arch flag: ppc (file ignored)
> and then thousands of errors that symbols can't be found.
> But:
> % file /Users/me/blah/foo.dylib
> foo.dylib: Mach-O universal binary with 2 architectures
> foo.dylib (for architecture i386): Mach-O dynamically linked shared library
> i386
> foo.dylib (for architecture ppc7400): Mach-O dynamically linked shared
> library ppc
> And I double (triple) checked that the paths in the link line are all
> correct and that files really exist there.
> Any ideas why this project builds/links fine under 3.x, but fails under 2.5?
>  BTW, when I build with just the ppc libs, the link works fine under both
> versions of Xcode.

The library "foo" was apparently built using either no SDK specified
(defaults to 10.5), or 10.5 SDK specified with a deployment target of
10.5. As a result Xcode is switching to build a ppc7400 binary - code
optimized to the G4 - since 10.5 only supports such systems. So no
generic ppc segment exists in your library.

If you specify the 10.4u SDK you wont have this issue or if you
specify 10.5 with a deployment target of 10.4.

...at least that is what I think is taking place...

Of course if the SDK and target are set as you want then in the
dependent project you may need to specify ppc7400 for arch instead of
ppc... sorry not sure what is the right way in this exact case.

-Shawn
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >-arch ppc works on Xcode 3.x, but not on 2.5. (From: David Springer <email@hidden>)

  • Prev by Date: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Next by Date: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Previous by thread: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Next by thread: Re: -arch ppc works on Xcode 3.x, but not on 2.5.
  • Index(es):
    • Date
    • Thread