Boost logo

Boost Users :

Subject: [Boost-users] [Timer] unresolved external symbol boost::chrono::time_point
From: Aman Wardak (aman.wardak_at_[hidden])
Date: 2016-02-17 01:38:31


Env: Win7 32-bit running in VirtualBox on Macbook Pro
Compiler: MS Visual Studio 14

It's my first time working with Boost.

I've followed the instructions here:
   http://www.boost.org/doc/libs/1_60_0/more/getting_started/windows.html

I've compiled Boost successfully:
============================
The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    C:\Users\IEUser\Documents\boost_1_60_0

The following directory should be added to linker library paths:

    C:\Users\IEUser\Documents\boost_1_60_0\stage\lib
==============================================

I've added the above paths in Visual Studio and was able to run the test in
step 6 of the instructions linked above to verify my environment is set up
correctly.

MY PROBLEM:
I'm trying to compile the very first sample code at this link:
   http://www.boost.org/doc/libs/1_60_0/libs/timer/doc/cpu_timers.html

I get the following error:

   ------ Build started: Project: BoostExample, Configuration: Debug Win32
------
  Source.cpp
libboost_timer-vc140-mt-gd-1_60.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
@chrono_at_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
__catch$??1auto_cpu_timer_at_timer@boost@@QAE_at_XZ$0
C:\Users\IEUser\Documents\Visual Studio
2015\Projects\CS2370\Debug\BoostExample.exe : fatal error LNK1120: 1
unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thanks,
Aman



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