Opened 9 years ago

Closed 9 years ago

#8492 closed Bugs (duplicate)

Using BOOST_THREAD_DYN_LINK causes error LNK2019

Reported by: lhoch@… Owned by: viboes
Milestone: To Be Determined Component: thread
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

HI I am using boost thread and linking it dynamically. specifically I use the BOOST_THREAD_DYN_LINK definition.

when I use try_join_for (template <class Rep, class Period> bool try_join_for(const chrono::duration<Rep, Period>& rel_time))

I get linkage error:

error LNK2019: unresolved external symbol "declspec(dllimport) public: bool cdecl boost::thread::try_join_until(class boost::chrono::time_point<class boost::chrono::system_clock,class boost::chrono::duration<int64,class boost::ratio<1,1000000000> > > const &)" (imp_?try_join_until@thread@boost@@QEAA_NAEBV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z) referenced in function "public: bool cdecl boost::thread::try_join_until<class boost::chrono::steady_clock,class boost::chrono::duration<int64,class boost::ratio<1,1000000000> > >(class boost::chrono::time_point<class boost::chrono::steady_clock,class boost::chrono::duration<int64,class boost::ratio<1,1000000000> > > const &)" (??$try_join_until@Vsteady_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@thread@boost@@QEAA_NAEBV?$time_point@Vsteady_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@1@@Z)

Note that if I remove the definition, it compiles fine.

we work on windows, using visual studio 2010 in 64bit

thanks

Lior

Change History (2)

comment:1 by viboes, 9 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

Hi, isn't this a duplicate of #8458 "-DBOOST_THREAD_DONT_USE_CHRONO in thread.obj.rsp but not explicitly set"?

Please take a look and let me know if the attached patch to this ticket works for you.

comment:2 by viboes, 9 years ago

Resolution: duplicate
Status: assignedclosed
Note: See TracTickets for help on using tickets.