Undefined boost library symbol (boost::system::error_category) using Qt 5.0.2 and VS 2012



  • I am building a application in Qt 5.0.2 (using VS2012) which uses the boost library. The linker detects the following undefined symbol in the boost library:

    "class boost::system::error_category const & __cdecl boost::system::generic_category(void)".

    I found that others had encountered this error with the advice to include the boost system library which I did. This didn't fix the problem so, as a brute force experiment, I included virtually every boost library (see below) yet the problem persists. If anyone can help I would appreciate it.

    LIBS += \ C:/boost_1_53_0/bin.v2/libs/atomic/build/msvc-11.0/debug/threading-multi/boost_atomic-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/chrono/build/msvc-11.0/debug/link-static/threading-multi/libboost_chrono-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/context/build/msvc-11.0/debug/threading-multi/boost_context-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/date_time/build/msvc-11.0/debug/link-static/threading-multi/libboost_date_time-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/exception/build/msvc-11.0/debug/link-static/threading-multi/libboost_exception-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/filesystem/build/msvc-11.0/debug/link-static/threading-multi/libboost_filesystem-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/iostreams/build/msvc-11.0/debug/threading-multi/boost_iostreams-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/locale/build/msvc-11.0/debug/threading-multi/boost_locale-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/math/build/msvc-11.0/debug/threading-multi/boost_math_tr1l-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/program_options/build/msvc-11.0/debug/threading-multi/boost_program_options-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/random/build/msvc-11.0/debug/threading-multi/boost_random-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/regex/build/msvc-11.0/debug/threading-multi/boost_regex-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/serialization/build/msvc-11.0/debug/threading-multi/boost_wserialization-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/signals/build/msvc-11.0/debug/threading-multi/boost_signals-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/system/build/msvc-11.0/debug/link-static/threading-multi/libboost_system-vc110-mt-gd-1_53.lib
    C:/boost_1_53_0/bin.v2/libs/thread/build/msvc-11.0/debug/link-static/threading-multi/libboost_thread-vc110-mt-gd-1_53.lib

    Wes



  • I had allso troubles with Boost by using 1.51.
    I switched to 1.47 then it worked.



  • Figured it out. I rebuilt the boost libraries as follows and it worked:
    bjam --build-type=complete --toolset=msvc address-model=64


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.