Re: Adding a 3rd party C++ library to ObjectiveC project
Re: Adding a 3rd party C++ library to ObjectiveC project
- Subject: Re: Adding a 3rd party C++ library to ObjectiveC project
- From: Jeffrey Walton <email@hidden>
- Date: Sat, 08 Jun 2013 15:22:10 -0400
On Sat, Jun 8, 2013 at 2:57 PM, Koen van der Drift
<email@hidden> wrote:
> What I ended up doing in the end was just copy the source and header files from the 3rd party library into my project, without creating a library. I spent hours searching and reading info on how to create a static library inside and outside Xcode, but I never could get it to work for both architectures.
>
Yeah, I've hit the same wall in the past. There's not much information
on porting a third party library to a Framework. Apple has information
on creating frameworks, but nothing for Makefile project -> Framework.
Stack overflow had no answers either (when I searched in the past).
Now I build the third party library using SDKROOT (the Makefiles have
to be made aware), and then install them in /usr/local. My installs
look similar to:
/usr/local/openssl/iphoneos-armv6
/usr/local/openssl/iphoneos-armv7
/usr/local/openssl/iphoneos-armv7s
/usr/local/openssl/iphone-simulator
/usr/local/openssl/macosx-i386
/usr/local/openssl/macosx-x86_64
I then use paths and conditional build settings to include the proper library.
Jeff
> On Jun 7, 2013, at 11:19 PM, Jeffrey Walton <email@hidden> wrote:
>
>> On Fri, Jun 7, 2013 at 11:14 PM, Koen van der Drift
>> <email@hidden> wrote:
>>>
>>> On Jun 7, 2013, at 3:33 PM, Koen van der Drift <email@hidden> wrote:
>>>
>>>> It's a static library (.a), and I don't expect any upstream updates soon. Oh, did I mention this is for an iOS project, that might bring some more fun with it ;-)
>>>
>>> So this turns out to be some kind of a hassle. Since the Simulator and the iPhone have two different architectures, I need to have two copies of the library available. Can I just create both, and add them to Xcode with a different name for each architecture? Maybe I should create a framework for the library instead, so I don't have to change the whole time?
>>>
>> http://stackoverflow.com/questions/1211854/xcode-conditional-build-settings-based-on-architecture-device-arm-vs-simulat
_______________________________________________
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