Re: libPng.dylib: "file is not of required architecture"
Re: libPng.dylib: "file is not of required architecture"
- Subject: Re: libPng.dylib: "file is not of required architecture"
- From: Chris Espinosa <email@hidden>
- Date: Thu, 7 Feb 2008 19:40:40 -0800
On Feb 7, 2008, at 5:53 PM, Jacob Bandes-Storch wrote: I've been working on a project on both my old PPC G4 and my Intel Core Duo macs. After working on the PPC, when I bring it over to the Intel computer, sometimes I get this build error:
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is not of required architecture collect2: ld returned 1 exit status
What causes this? It's using the 10.4 SDK... I'm trying to make the program compatible at least back to 10.4. Sometimes this works, sometimes it doesn't... What causes this problem that must have changed? (I also get something about build.hmap being/not being a directory — that's fixed by cleaning the build.)
The 10.4u SDK has a symlink from its /usr/local subdirectory to the system's /usr/local. It seemed like a good idea at the time, to allow you to loop in local libraries when using an SDK, but it probably wasn't such a good idea.
You've installed some code (I wish I knew what it was, it seems pretty popular) that puts a PPC-only version of several graphics libraries in /usr/local/lib, superseding the system's Universal versions. When you link your Intel code against this PPC-only library, it gets the above error.
The solution is to remove those librariesfrom /usr/local/lib, or remove the symlink from MacOSX10.4u.sdk/usr/local.
Chris |
_______________________________________________
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