CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2013
    Posts
    17

    boost::thread error

    Hi,
    when i try to include <boost/thread.hpp> to my project i gets:

    error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ) referenced in function "public: __thiscall boost::thread_exception::thread_exception(int,char const *)" (??0thread_exception@boost@@QAE@HPBD@Z)

    i work with other boost libs fine.

    i have VS2010, win 7, 64 bit.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: boost::thread error

    You have linkage error, not a compile one. It means you missed to add some .lib or .obj module containing the correspondent function.
    Victor Nijegorodov

  3. #3
    Join Date
    Apr 2013
    Posts
    17

    Re: boost::thread error

    i didn't use any function.. only #include <boost/thread.hpp>.

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: boost::thread error

    You do use (direct or indirect) something like "class boost::system::error_category const & __cdecl boost::system::system_category(void)" which is
    referenced in function "public: __thiscall boost::thread_exception::thread_exception(int,char const *)"
    At least it is what your error LNK2019 shows you!
    Victor Nijegorodov

  5. #5
    Join Date
    Oct 2008
    Posts
    1,456

    Re: boost::thread error

    evilGil, contrary to most boost libraries, boost::thread is NOT header-only and it should be compiled separately to the wanted target. With VC++, everything is automated, just take a look at boost installation docs for further details ...

  6. #6
    Join Date
    Apr 2013
    Posts
    17

    Re: boost::thread error

    thanx for the help.. if someone already know the issue please tell me instead of reading lots of pages for one small f&^%ing problem.

  7. #7
    Join Date
    Apr 2013
    Posts
    17

    Re: boost::thread error

    no one knows????

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: boost::thread error

    Quote Originally Posted by evilGil View Post
    no one knows????
    It is Visual C++ Programming forum, not a boost one! Therefore there are not so many people using boost and knowing how to solve problems with this library.
    So maybe you will try to ask this specific question in some of the boost forums?
    Victor Nijegorodov

  9. #9
    Join Date
    Apr 2013
    Posts
    17

    Re: boost::thread error

    that what fix the problem...
    bjam.exe toolset=msvc-10.0 runtime-link=static,shared link=static threading=multi --without-python --without-math --without-wave --without-mpi --without-test --without-graph --without-graph_parallel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured