Boost logo

Boost Users :

From: Mike Feldmeier (pooky_bunny_at_[hidden])
Date: 2004-05-25 11:59:02


>From: "Ben Hutchings" <ben.hutchings_at_[hidden]>
>Reply-To: boost-users_at_[hidden]
>To: <boost-users_at_[hidden]>
>Subject: RE: [Boost-users] boost::thread, boost::bind, and member functions
>Date: Tue, 25 May 2004 17:32:10 +0100
>
>Mike Feldmeier <pooky_bunny_at_[hidden]> wrote:
>[ Ben Hutchings wrote:]
> > > Mike Feldmeier <pooky_bunny_at_[hidden]> wrote:
><snip>
> > > > This consistently produces the linking error:
> > > >
> > > > converter.obj : error LNK2019: unresolved external symbol
> > > > "__declspec(dllimport) public: __thiscall boost::thread::thread(
> > > > class boost::function0<void,class
> > > > _STL::allocator<class boost::function_base> > const &)"
> > > > (__imp_??0thread_at_boost@@QAE_at_ABV?$function0_at_XV?$allocator_at_Vfunction
> > > > _base_at_boost@@@_STL@@@1@@Z) referenced in function "public: void
> > > > __thiscall mytest::test::converter::run(void)"
> > > > (?run_at_converter@test_at_mytest@@QAEXXZ)
> > >
> > >I think you aren't linking with the thread library.
><snip>
> > I'm using Visual C++ 7.1, but using straight C++, no .NET. I've
> > defined the addtional library path (C:\boost\lib) and tried linking
> > (in the additional dependencies) with
> > boost_thread-vc71-mt-gdp-1_31.lib, boost_thread-vc71-mt-gdp.lib,
> > boost_thread-vc71-mt-p-1_31.lib, and boost_thread-vc71-mt-p.lib (one
> > at a time, of course), but I get the same error message with all of
> > them.
><snip>
>
>I've worked it out now. In your main program you are using STLport -
>notice the "_STL" namespace instead of "std" but Boost.Thread is
>built with the library that comes with VC++ 7.1, which of course uses
>the "std" namespace. Unless STLport has some specific feature that
>you need I suggest you use the standard library that comes with VC++
>7.1; it's a very good implementation. If you must use STLport then
>you need to build Boost.Thread (and any other libraries with which
>you share standard library types) using it.
>

Unfortunately, this whole roadtrip started with the need for STL collections
to cross DLL boundaries, which is why I am using STLPort. The STL that
comes with VC++ 7.1 doesn't (with the exception of string and vector). When
I built boost, I built it with the vc7.1-stlport toolset, and I have the
stlport library directory in my "additional library path". Along this line,
I wonder if I need to be doing something special with the STLPort DLL?

>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/


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