Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-07-29 05:24:46


> I did some development with libboost_regex-gcc.so (1.31.0) on a Linux
> platform: no problems.
> However, when I try to compile on FreeBSD, I get the following errors:
>
> g++ -o myprog Unit1.o Unit2.o /usr/local/lib/libboost_regex-gcc.so
>
> /usr/local/lib/libboost_regex-gcc.so: undefined reference to
> 'pthread_mutex_unlock'
> /usr/local/lib/libboost_regex-gcc.so: undefined reference to
> 'pthread_mutex_destroy'
> /usr/local/lib/libboost_regex-gcc.so: undefined reference to
> 'pthread_mutex_lock'
> /usr/local/lib/libboost_regex-gcc.so: undefined reference to
> 'pthread_mutex_init'
>
> I've installed Boost on the FreeBSD platform using both the ports package
> available from freebsd.org and the source from boost.org. Both yield the
> same results.
>
> Any ideas appreciated, as I am not that experienced with C++, Boost, and
> cross-platform deployment.

gcc on FreeBSD is set up thread safe by default, so regex is as well, just
add -lpthread to the link command line (alternatively you could rebuild
everything with -DBOOST_DISABLE_THREADS).

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk