Boost logo

Boost Users :

From: bill_kempf (williamkempf_at_[hidden])
Date: 2002-01-02 11:26:55


--- In Boost-Users_at_y..., "cadenzajon" <alphaomega_at_p...> wrote:
> Hi all,
>
> I'm starting to use boost for the first time now, but I'm having
> problems linking to the thread library (libboost_thread.lib) from
> within Visual C++.
>
> Using my main compiler, VC++ 6.0, I get the following linker error:
> libboost_thread.lib(exceptions.obj) : error LNK2001: unresolved
> external symbol "__declspec(dllimport) public: __thiscall
> std::basic_string<char,struct std::char_traits<char>,class
> std::allocator<char> >::basic_string<char,struct std::char_traits<ch
> ar>,class std::allocator<char> >(char const *)"

I'm 99% sure this is caused by not linking against the Multithreaded
DLL version of the runtime library. (See another post here for exact
directions on changing this.)

> I checked the compiler compatibility tables online at the boost
> site, but they're not recent enough to include any details on the
> thread library.

Actually, they are recent enough. The problem is that the automated
utilities used to generate this table aren't compatible with the
structure of Boost.Threads. The Boost.Build system is attempting to
address this problem and eventually Boost.Threads will be included in
these tables.
 
> When I use Visual C++ .NET (feel free to shrink away in horror) to
> test it, I get about 8 linker errors complaining that a handful of
> standard library functions (most dealing with the basic_string and
> exception classes) are being redefined by libboost_thread.lib.

Also probably caused by not linking against the multithreaded DLL
version of the runtime library.
 
> Does anybody have any experience with this or ideas on what I could
> be doing wrong? I'm just starting to do multi-platform software
> design, and boost::thread would be a godsend!

I hope this was enough to get you going. If not just ask more
questions.

Bill Kempf


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net