bitwise
bitwise

Reputation: 591

Statically link Boost Thread 1.56 lib in an Xcode 6 project

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

Upvotes: 0

Views: 438

Answers (1)

bitwise
bitwise

Reputation: 591

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...

Upvotes: 1

Related Questions