Showing posts with label boost. Show all posts
Showing posts with label boost. Show all posts

Wednesday, June 8, 2011

ld: bad codegen, pointer diff in boost::detail::sp_counted_base::sp_counted_base

Trying to build an iOS project with XCode 4:

- boost built as a framework
- a static library
- the iOS app

which gives the above error. I get the same behavior no matter which compiler I select (gcc, gcc-llvm, clang), which makes a little sense since it's a linker error.

A little (lot) of googling finds a lot of suggestions to play with the compiler visibility flags. Some people say enable, others disable. The short answer is, yes, this is how I fixed things. But just messing with symbol visibility without understanding the problem rubs me the wrong way, especially when the oh-so-useful but oh-so-frightening boost is involved.