Boost logo

Boost Users :

Subject: Re: [Boost-users] Multiple defined symbols
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-04-08 12:53:11


AMDG

On 04/08/2015 04:59 AM, Lloyd wrote:
> Hi,
>
> I have a "dll" project which is dependent on boost libraries like thread
> and system. When I compile my project I gen error like
>
> libboost_thread-vc120-mt-gd-1_57.lib(thread.obj) : error LNK2005: "public:
> virtual __thiscall
> boost::detail::thread_data_base::~thread_data_base(void)"
> (??1thread_data_base_at_detail@boost@@UAE_at_XZ) already defined in
> boost_thread-vc120-mt-gd-1_57.lib(boost_thread-vc120-mt-gd-1_57.dll)
>
> What I understood from this error is, my project is trying to link to both
> dynamic and static boost libraries. I only want to link to the boost thread
> dll.

You need -DBOOST_ALL_DYN_LINK.

> To my knowledge am not directly using any boost autolink feature.
>

Autolink is activated by including boost headers.

> In the visual studio linking option I have mentioned only the
> "boost_thread-vc120-mt-gd-1_57.lib". Why could it be trying to link to
> libboost_thread-vc120-mt-gd-1_57.lib? Is there any way to find where this
> is happening?
>

In Christ,
Steven Watanabe


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