Help linking libraries into an xcode project
Help linking libraries into an xcode project
- Subject: Help linking libraries into an xcode project
- From: John Gentilin <email@hidden>
- Date: Fri, 18 Jun 2010 15:59:10 -0700
I am working with the ReMail open source project, trying to educate
myself with the projects structure and currently I am having a problem
understanding how external libraries work in XCode / Objective-C
The ReMail project has a dependency on an external project called
MailCore, MailCore is dependent on a set of encryption libraries
located in a sub-directory of MailCore. The remail-iphone and
mailcore directories are siblings.
In the ReMail project, under the Framework folder, the encryption
libs are included twice, once for the simulator and once for the device
build.. an example libcrypto.a is included as.
../mailcore/libetpan/binaries/Developer/Platforms/
iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/
Release/lib/libcrypto.a
../mailcore/libetpan/binaries/Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/
Debug/lib/libcrypto.a
I think it works because one lib is ignore during the build because it
is not built for the right architecture.
My question is, is this the right way to do it, or there some naming
convention where I just specify the top level directory and based on
Sim or device, and version it figures out the correct sub directory ?
One problem I am having is; If I select Device-3.0 it works fine,
if I select Device-3.1.2, the linker ignores the device version of the
library and tries to link against the simulator version and then complains
that the architecture, and fails because symbols are not found.. See
linker message below.. Although if I select Simulator-3.0 or
Simulator-3.1.2
both work fine.
Thank you
John Gentilin
ld: warning: in /Users/gentijo/Projects/ECS/ReMail/mailcore/libetpan/
binaries/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
iPhoneSimulator3.0.sdk/Debug/lib/libcrypto.a, file is not of required
architecture
_______________________________________________
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