Hello,
I'm using boost for the first time and I'm struggling to link my
program. I've added libboost_pthread-mt to the link link (which got
most of the symbols), but I still can't seem to get the symbols for the
condition variables. The issue could be with the code, as I find the
lock-mutex-condition_variable interactions to be very confusing, but it
does appear to be a link issue. Consider the following error message
emitted during link command:
mpicxx <objects> -D_FILE_OFFSET_BITS=64 -L/lib64 -lfuse -lrt -ldl
-lboost_thread-mt -lpthread -o aio_benchmark
src/aio/thread_pool_adaptive_writer.o: In function
`aio::ThreadPoolWriter::Write(aio::File*, std::vector, void*, unsigned long)':
/home/bws/sandbox/aiofs/src/aio/thread_pool_writer.cc:59: undefined
reference to `boost::condition_variable::notify_all()'
/home/bws/sandbox/aiofs/src/aio/thread_pool_writer.cc:63: undefined
reference to
`boost::condition_variable::wait(boost::unique_lockboost::mutex&)'
src/aio/thread_pool_writer.o: In function
`aio::ThreadPoolWriter::threadWait()':
/home/bws/sandbox/aiofs/src/aio/thread_pool_writer.cc:76: undefined
reference to
`boost::condition_variable::wait(boost::unique_lockboost::mutex&)'
/home/bws/sandbox/aiofs/src/aio/thread_pool_writer.cc:110: undefined
reference to `boost::condition_variable::notify_one()'
Is condition variable in a different library? I am using the boost
stuff distributed with Fedora 11:
boost-1.37.0-7.fc11.x86_64
boost-devel-1.37.0-7.fc11.x86_64
Cheers,
Brad