Doug Smith
Doug Smith

Reputation: 29326

How do I compile boost into a .a library for use in an xcodeproj?

I currently have a file called libboost_serialization.a left over from another developer, but when I try to compile I get Undefined symbols for architecture x86_64: and a ton of errors. I'm assuming this is because the .a file has been built for 32 bit, not 64, so I'm trying to recompile boost for 64 bit.

I'm having trouble, though. I've came across many guides like this that go over how to get boost installed onto your system, but nothing on compiling boost into a .a for use in a project. How would I go about doing this?

Upvotes: 0

Views: 100

Answers (1)

hogliux
hogliux

Reputation: 251

In essence you need to enable static libraries when compiling the boost libraries.

  1. Download and unpack the source code
  2. boot-strap boost build by executing ./bootstrap.sh
  3. Then execute b2 with the option link=static, for example, I use ./b2 link=static --prefix=/usr/local and then install the result with sudo ./b2 link=static --prefix=/usr/local install

Upvotes: 1

Related Questions