• 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
OSX library: unsupported file format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OSX library: unsupported file format


  • Subject: OSX library: unsupported file format
  • From: Nathan Sims <email@hidden>
  • Date: Thu, 26 May 2011 12:55:48 -0700

I'm having trouble linking with a static C library I built in Xcode 3.2.6 on an iMac 10.6.7.

$ cc -g -o test test.c build/Debug/libTestOSX.a
ld: warning: in build/Debug/libTestOSX.a, file was built for unsupported file format which is not the architecture being linked (x86_64)

$ file build/Debug/libTestOSX.a
build/Debug/libTestOSX.a: current ar archive random library

In Xcode, the settings for the library are:

  ARCHS = $(ARCHS_STANDARD_32_64_BIT)
  SDKROOT = macosx
  ONLY_ACTIVE_ARCH = NO
  VALID_ARCHS = i386 ppc ppc64 ppc7400 ppc970 x86_64

When I build with these settings in Xcode, the Build log says:
  Libtool build/Debug/libCloudServerOSX.a normal i386

What am I doing wrong?

Is it possible to build a 'universal' library that includes both x86_64 and i386 architectures? Right now I have to build specifically for each of those target types.

 _______________________________________________
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

  • Follow-Ups:
    • Re: OSX library: unsupported file format
      • From: Scott Ribe <email@hidden>
  • Prev by Date: XCode 3.2.6. "Build and Archive"
  • Next by Date: Re: OSX library: unsupported file format
  • Previous by thread: XCode 3.2.6. "Build and Archive"
  • Next by thread: Re: OSX library: unsupported file format
  • Index(es):
    • Date
    • Thread