From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-03-28 08:20:28
Neal D. Becker wrote:
> I just installed boost_1_30_0 and updated to glibc-2.3.2 on my RH8.0
> Linux box. Now I have problems to create a static link of my
> I'm wondering what is the correct link procedure.
> g++ -Wall -I ../../src/fixed -I ../../src/float -O3 -ffast-math
> -fstrict-aliasing -m3dnow -ggdb -march=athlon-xp -mcpu=athlon-xp
> -fprofile-arcs -D_GNU_SOURCE -Wp,-MMD,.d/Test34.d -o Test34 Test34.o
> -liTest -lpopt -lcephes -lfftw -static
> Test34.o: In function
> std::char_traits<char> >*,
> std::char_traits<char> > > >(std::basic_ofstream<char,
>> *, boost::checked_deleter<std::basic_ofstream<char,
>> std::char_traits<char> > )':
> /usr/include/c++/3.2/iostream:62: undefined reference to
> It seems adding -lpthread fixes this, but 1) I don't use thread 2) it
> isn't needed for normal (nonstatic) link, and wasn't needed before
> the updates.
You need -DBOOST_DISABLE_THREADS since on your platform Boost.Config cannot
automatically determine whether -lpthread has been supplied.
Glibc used to have weak stub definitions of pthread_mutex_* that did
nothing; apparently its newer version no longer does.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk