I have built Boost from the website using

./bootstrap.sh 
./b2 install

[IMG]http://i.stack.imgur.com/VDrHd.jpg[/IMG]
[IMG]http://i.stack.imgur.com/ZaBfk.jpg[/IMG]

I think all are installed properly. I am trying to use Xcode to include the library of boost:thread.My code links to the header file properly with " #include "boost/thread.hpp"" commented, as seen from the following:

[IMG]http://i.stack.imgur.com/XW1qE.jpg[/IMG]

However, it could not link properly to boost-thread if "#include "boost/thread.hpp"" is un-commented.

[IMG]http://i.stack.imgur.com/fKNj9.jpg[/IMG]

Error page is shown as:

[IMG]http://i.stack.imgur.com/tFXV9.jpg[/IMG]

I have linked the dynamic library libboost_thread.a and libboost_thread.dylib and included /usr/local/include into header search path and /usr/local/lib into library search path.

[IMG]http://i.stack.imgur.com/UGYeN.jpg[/IMG]
[IMG]http://i.stack.imgur.com/mjoFi.jpg[/IMG]
[IMG]http://i.stack.imgur.com/Wc3D4.jpg[/IMG]

I am really desperate on knowing how to resolve this issue... Please help me. Thank you very much:)

You need to also add boost-system (libboost_system.a or libboost_system.dylib). And make sure to add it after boost-thread in the list of libraries to link with. This is just because boost-thread depends on boost-system, so both need to be linked, in that order.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.