Boost logo

Boost :

Subject: Re: [boost] [Review] Formal Review of Proposed Boost.ChronoLibrary Starts TOMORROW
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-11-11 11:17:35


----- Original Message -----
From: "Paul A. Bristow" <pbristow_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, November 11, 2010 4:37 PM
Subject: Re: [boost] [Review] Formal Review of Proposed Boost.ChronoLibrary Starts TOMORROW

> I've started to play with this after starting to read the (nice) docs.
>
> But I've come to a sudden halt on the "Hello World" :-(
>
> Running it without has produced the (expected) warning that I haven't built
> the library yet)
>
> LINK : fatal error LNK1104: cannot open file
> 'libboost_chrono-vc100-mt-gd-1_45.lib'
>
> Assuming I could just try it out as header only first, (before I begin
> swearing at bjam ;-)
>
> I've added
>
> #define BOOST_CHRONO_INLINED
>
> // run_timer_example.cpp
> ---------------------------------------------------//
>
> #define BOOST_CHRONO_INLINED
>
> #include <boost/chrono/process_times.hpp>
> #include <cmath>
> ...
>
> But got a surprising list of errors:
>
> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(142):
> error C2008: '$' : unexpected in macro definition
> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(294):
> error C2008: '$' : unexpected in macro definition
> C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h(295):
> warning C4005: '__' : macro redefinition
>
> What am I doing wrong?

Hi, currently Boost.Chrono in a header only library if Boosy.System it is also. You need have you defined BOOST_SYSTEM_INLINED?

When I remove the BOOST_SYSTEM_INLINED I get the expected error:

run_timer_example.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category_at_system@boost@@YAABVerror_category_at_12@XZ) referenced in function "public: __thiscall boost::system::error_code::error_code(void)" (??0error_code_at_system@boost@@QAE_at_XZ)

On cygwin I get the following

$ g++ -I /boost/v44 ../example/run_timer_example.cpp -D BOOST_CHRONO_INLINED -D
 BOOST_SYSTEM_INLINED

Vicente_at_viboes1 /boost/v44/libs/chrono/test
$ ./a.exe

real 0.015s, cpu 0.000s (0.0%), user 0.000s, system 0.000s

Could you sent the command line you used?

Best,
Vicente


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