Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5899 closed Bugs (duplicate)

Boost Chrono cannot find references.

Reported by: boost@… Owned by: viboes
Milestone: Component: chrono
Version: Boost 1.47.0 Severity: Problem
Keywords: chrono link Cc:

Description

I compiled 1.47.0 today as per the documentation and this is what I get when I am trying to compile the chrono example run_timer_example.cpp:

With icc:

$ icc run_timer_example.cpp -I/home/yann/src/boost_1_47_0 -L/home/yann/src/boost_1_47_0/stage/lib -lboost_system -lboost_chrono
/tmp/icciMiW90.o: In function `main':
run_timer_example.cpp:(.text+0x33): undefined reference to `boost::chrono::run_timer::run_timer(boost::system::error_code&)'
run_timer_example.cpp:(.text+0xa5): undefined reference to `boost::chrono::run_timer::report(boost::system::error_code&)'

with gcc:

$ gcc run_timer_example.cpp -I/home/yann/src/boost_1_47_0 -L/home/yann/src/boost_1_47_0/stage/lib -lboost_system -lboost_chrono
/tmp/ccW6yHqX.o: In function `main':
run_timer_example.cpp:(.text+0x16): undefined reference to `boost::chrono::run_timer::run_timer(boost::system::error_code&)'
/tmp/ccW6yHqX.o: In function `boost::chrono::run_timer::~run_timer()':
run_timer_example.cpp:(.text._ZN5boost6chrono9run_timerD2Ev[_ZN5boost6chrono9run_timerD5Ev]+0x3b): undefined reference to `boost::chrono::run_timer::report(boost::system::error_code&)'
collect2: ld returned 1 exit status

I do have the library here:

$ ls -l  *chrono*
116K -rw-r--r-- 1 yann yann 116K Sep 14 11:30 libboost_chrono.a
   0 lrwxrwxrwx 1 yann yann   25 Sep 14 11:30 libboost_chrono.so -> libboost_chrono.so.1.47.0*
 44K -rwxr-xr-x 1 yann yann  41K Sep 14 11:30 libboost_chrono.so.1.47.0*

Change History (3)

comment:1 by Steven Watanabe, 11 years ago

Component: Nonechrono
Owner: set to viboes

comment:2 by viboes, 11 years ago

Resolution: duplicate
Status: newclosed

Hi,

Sorry I didn't see your ticket..

This example is from the legacy version previous to the review (from Beman). I have removed them from the release, see #5977.

Beman has added something similar in Boost.Timer.

comment:3 by viboes, 11 years ago

Milestone: To Be Determined
Note: See TracTickets for help on using tickets.