Boost logo

Boost :

Subject: [boost] [boost.timer v2] auto_cpu_timer does not compile
From: Tan, Tom (Shanghai) (TTan_at_[hidden])
Date: 2016-05-29 03:08:34


This following snippet generates an error with VS2015 both fo 1.60&1.61:

libboost_timer-vc140-mt-s-1_61.lib(cpu_timer.obj) : error LNK2019: unresolved external symbol "public: static class boost::chrono::time_point<class boost::chrono::steady_clock,class boost::chrono::duration<__int64,class boost::ratio<1,1000000000> > > __cdecl boost::chrono::steady_clock::now(void)" (?now_at_steady_clock_at_chrono@boost@@SA?AV?$time_point_at_Vsteady_clock_at_chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@23_at_XZ) referenced in function "public: struct boost::timer::cpu_times __cdecl boost::timer::cpu_timer::elapsed(void)const " (?elapsed_at_cpu_timer_at_timer@boost@@QEBA?AUcpu_times_at_23@XZ)

// compile with cl.exe /EHSc
#include <boost/timer/timer.hpp>

int main()
{

boost::timer::auto_cpu_timer t;

}

What's interesting is that uncommenting line #14 in file boost/timer/timer.hpp would get rid of this error.

- Why is there such a line but commented out there?

- Is there a better way to get it through without modifying this file

- the binary is downloaded from sourceforge, not a custom build.

-
Thanks.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk