Search code examples
c++qtboost-thread

How to link against boost_thread on macosx using qt creator?


First off, I don't know much about C++ or QT creator, but I downloaded an old open-source project and I'm trying to compile it using QT Creator and QT 5.1.1

I've gotten passed quite a few errors, but now I'm stuck at boost thread.

error: 'boost/thread.hpp' file not found

Autocomplete seems to suggest it exists. I tried downloading and compiling the source, copied the .a file to the clang_64/lib folder and added LIBS += -lboost_thread to the .pro file. (this approach seemed to help a few times before with some other libraries).

I'm probably missing something obvious, but I have no idea what.


Solution

  • you may need build boost_thread and boost_system library first. then add this in you .pro file:

    INCLUDEPATH += E:\boost_1_54_0
    LIBS += -LE:/boost_1_54_0/stage/lib -lboost_system-mgw44-mt-1_54 -lboost_thread-mgw44-mt-1_54
    

    I am test on window, please change the path in your computer.