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: Koen van der Drift <email@hidden>
- Date: Fri, 07 Jun 2013 13:01:14 -0400
On Jun 7, 2013, at 12:45 PM, Jens Alfke <email@hidden> wrote:
> It’s probably easiest to just use the supplied makefile/scripts to build the library, rather than trying to get Xcode to build it. As long as the build process outputs a library of some sort (.dylib or .a) you can add that file to your Xcode project.
Yep, I just finished doing that :) It took a while, I needed Boost as a dependency, and used MacPorts to install that from the terminal. After that was done, I could build my library. So I now have a .a file in /usr/local/lib/ and a bunch of .hpp files in /usr/local/include/ Do I need all of these in Xcode?
> I recommend making an Objective-C wrapper around the C++ API. Then the only .mm files you need are for the ones that implement that wrapper. The rest of your app can just use the Objective-C API and not have to worry about C++.
The library is just used with one of my ObjC files, so I'll start with renaming that to .mm. If that doesn't work, I'll look into the wrapper as you suggested.
Thanks,
- Koen.
_______________________________________________
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