Hi!


On Sat, Nov 1, 2008 at 11:53 AM, professor rumsdiegeige <professor_rumsdiegeige@yahoo.com> wrote:
Hello,

I'm trying to compile a simple program with a boost::mutex in it. It compiles fine, but the linking process shipwrecks:

"undefined reference to `boost::mutex::~mutex()' "

I'm using ubuntu 8.04 and boost 1.34. When I try to compile the same program on MSVS 2005, it compiles, links and works fine

Do I need to link explicitly to certain library?  On the web I found sth. about needing to link against posix4 - but that didn't help.

Any help appreciated!
[...]
 
you need to link against the boost-threads library. Under MSVC boost uses auto-linking feature and specifies the libs to be linked via a pragma directive in a header file of the lib. AFAIK GCC does not support this, so you need to do it explicitly yourself using the -l linker option.

Regards,
Ovanes