Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link to Boost for iPhone using XCode

I successfully built boost for iPhone thanks to this: http://gitorious.org/boostoniphone/boostoniphone However, I'm having trouble linking to it in XCode 3.2.6. I get errors such as:

error: boost/unordered_map.hpp: No such file or directory

I have dragged the "build" folder containing the .a and .o files for arm6, arm7 and i386 into "frameworks", and added the "include" folder which contains the "boost" folder which contains all the headers, to User Paths in the build settings, all to no avail. I would be grateful for some precise, step-by-step directions how to link to this library (i.e. please presume I'm kind of stupid! Which may actually be the case!) Other postings I have found on this subject are rather vague in terms of concrete actions that need to be taken. Thanks in advance for any help.

like image 468
Matthias D Avatar asked Jun 12 '11 16:06

Matthias D


1 Answers

OK so I worked it out. I will leave aside my feelings of intellectual inadequacy. For those who may have the same problem, here are step-by-step instructions.

First, you must have compiled boost on iPhone using the code and instructions from the boostoniphone project.

Navigate within the "boostoniphone" folder to the "framework" folder. Click on the "boost.framework" folder in that location, and drag it into the main xcode window, in the left hand side column, into the "frameworks" group (along with all the other frameworks, i.e. Foundation.framework, UIKit.framework, etc.)

That's it. If you added any build settings while trying to get this to work, remove them.

Note to self: next time, study the example project and copy its settings.

like image 199
Matthias D Avatar answered Oct 06 '22 23:10

Matthias D