0

I have a very simple Xcode 6 project in which I'm trying to link to boost_thread and boost_system statically. I've build the libraries (I have the libboost_thread.a and libboost_system.a), I've included all the right header/library search paths, flags etc as I do with any other static lib in the project and the project builds successfully, yet when I run it, it gives me a runtime dlopen error that it can't find the boost_thread.dylib lib ?!

I do not link to any dylib version of any boost lib, only those two static ones. Why is it trying to dynamically load a library? Can anyone give me a hint on what's this all about?

Thanks

bitwise
  • 541
  • 6
  • 16
  • Further, otool -L shows that the app actually depends on libboost_thread.dylib ?! Like I said, I have not used any dylibs in this project, boost must be doing something behind the scenes then? – bitwise Oct 09 '14 at 20:24

1 Answers1

1

The quick fix: Clean out boost and run bjam again with link=static

The explanation for anyone that stumbles on this, here's what the problem was:

I had build the entire boost package with its default config. That, however, for whatever reason does not include the static libs for system and thread. Running bjam after that sith link=static did infact build the libs but for whatever reason, they were pointing to the dylibs...

bitwise
  • 541
  • 6
  • 16