Mailinglist Archive: opensuse-programming (148 mails)

< Previous Next >
linking boost/libs/test/example/exec_mon_example.cpp
  • From: "Steven T. Hatton" <hattons@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 2 Sep 2004 07:49:39 -0400
  • Message-id: <200409020749.39888.hattons@xxxxxxxxxxxxxxxxxx>
For some reason the file that should be found here was omitted in the SuSE 9.1
distrubution:
file:/usr/share/doc/packages/boost-doc/libs/test/doc/examples/exec_mon_example.html
I believe this is part of the same boost distribution:
http://www.boost.org/libs/test/example/exec_mon_example.cpp

When I try to build it, I get the following error:

g++ -o exec_mon_example exec_mon_example.cpp
/tmp/ccjpo1st.o(.text+0x11c): In function `main':
: undefined reference to `boost::execution_monitor::execute(bool, int)'
collect2: ld returned 1 exit status

I've tried linking like this

g++ -o exec_mon_example -l boost_test_exec_monitor-gcc -l\
boost_unit_test_framework-gcc exec_mon_example.cpp
/usr/lib/libboost_test_exec_monitor-gcc.so: undefined reference to\
`test_main(int, char**)'
/usr/lib/libboost_unit_test_framework-gcc.so: undefined reference to\
`init_unit_test_suite(int, char**)'
collect2: ld returned 1 exit status

Since the libraries are in /usr/lib I don't believe I should have to do
anything special to link to them. Can anybody tell me what I'm doing wrong?
--
Regards,
Steven

< Previous Next >
Follow Ups