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@detail@boost@@UAE@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