I am trying to compile the run_timer_example.cpp example in the boost distribution (1.47.0) and I am getting this using the Intel compiler:
$ icc -I/usr/local/include -L/usr/local/lib -lboost_system -lboost_chrono run_timer_example.cpp
/tmp/iccUIv4Av.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&)'
and using GNU:
$ g++ run_timer_example.cpp -I/usr/local/include -L/usr/local/lib -lboost_system -lboost_chrono
/tmp/cc3ZOLLF.o: In function `main':
run_timer_example.cpp:(.text+0x16): undefined reference to `boost::chrono::run_timer::run_timer(boost::system::error_code&)'
/tmp/cc3ZOLLF.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
What am I missing?
Edit: I gave up in the end. It appears my install of Ubuntu cannot deal with compiling Boost 1.47.0 correctly and thus I cannot use it. Shame.
This example was there before the review and uses some interface that is not part of the reviewed Chrono library. I forgot just to remove it. Done in 1.48.
Sorry for the disturbance.