Re: Resolve library conflict
Re: Resolve library conflict
- Subject: Re: Resolve library conflict
- From: Chris Espinosa <email@hidden>
- Date: Wed, 7 Oct 2009 12:24:56 -0700
On Oct 7, 2009, at 11:34 AM, John Velman wrote:
I want to use a .o file produced by Haskell using the Haskell to C
Foreign
Function interface within an Xcode project. The Haskell .o file
depends on
a bunch of Haskell libraries, which are all in
/Library/Frameworks/Versions/Current/usr/lib or one of its
subdirectories.
Adding these to the project, everything seems to link, _except_, one
required library is the Haskell version of libgmp.a
When I don't add libgmp.a, I get undefined symbols that are all
defined int
the Haskell libgmp.a.
When I do add libgmp.a, I get the message (here edited to
multilines for
readability:
----
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/
libgmp.dylib,
file is not of required architecture
----
Apparently, the fact that there is a libgmp.dylib in "the usual
place" is
preventing Xcode from looking in the library I specifically add.
This is
the case even when I try copying the Haskell library into my project
folder, or when the target linked library info shows path for this
library
as
/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/
libgmp.a
I'm out of my depth here. I've tried to find a way around this in
Ch 21
(and elsewhere) in Fritz Anderson's "XCode 3 Unleashed", but can't
find it.
I'm still with Xcode 3.1.3, on OS X 10.5.8, 2.4GHz Intel Core 2 Duo.
1) You can remove the .a file from your project and instead link to it
with a specific linker directive by adding "-l/Library/Frameworks/
GHC.framework/Versions/610/usr/lib/ghc-6.10.4/libgmp.a' to the Other
Linker Flags build setting.
2) You can defeat the "helpful" access through the 10.5 SDK to /usr/
local/lib by deleting the symlink at /Developer/SDKs/MacOSX10.5.sdk/
usr/local/lib
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